Use HTML5 to Require a Field**

Tell us what’s happening:

When I add the ‘required’ to the input field and try to run the tests, nothing happens. I’m not sure if anything more needs to be added to the code.

Your code so far

  <p>Click here to view more <a href="#">cat photos</a>.</p>
  <a href="#"><img src="" alt="A cute orange cat lying on its back."></a>
  <p>Things cats love:</p>
    <li>cat nip</li>
    <li>laser pointers</li>
  <p>Top 3 things cats hate:</p>
    <li>flea treatment</li>
    <li>other cats</li>
  <form action="/submit-cat-photo">
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134.

Link to the challenge:

I copied and pasted all your code into my FCC window and it worked perfectly.
I am using a Chrome browser though so maybe that makes a difference in this case if you are not.


@hbar1st Oh, thank you so much ! It worked in Chrome. I hope my questions reach you next time as well ! Cheers ! :smile:

1 Like