Use HTML5 to Require a Field 5

Tell us what’s happening:
Having major difficulties on this one, yet again. I’m trying to go back through all of them and take notes on them, but so far, I’m completely stumped.

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">
    <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/71.0.3578.98 Safari/537.36.

Link to the challenge:

Input elements have different attributes like type, name, etc. Here they are asking you to add the required attribute to the input element.

As it is right now, your input has 2 attributes; type and placeholder, you just need to add the attribute the challenge is asking for.

For mor info


What they are telling you to do is to make sure users fills the <input> before he can submit, and to do it, you will add required within your input tag, just like this:

<input type="text" placeholder="cat Photo URL" required >

I hope you get this?

Happy coding!

I got it once I reviewed a video on scrimbia. I’m using that video website to figure out how to do things now so I can take notes. But thank you anyways! :smile:

1 Like

Thanks also, the first time hearing scrimbia. You contributed to my knowledge also!

You’re welcome :smiley: I was told about scrimbia by someone on another post of mine, and it’s very helpful. Here’s the link to the website for more help:

1 Like