Use HTML5 to Require a Field**

Use HTML5 to Require a Field**
0

#1

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


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

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:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/use-html5-to-require-a-field/


#2

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.


#3

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