Required attribute

Tell us what’s happening:
I am on the required attribute. I have added required with a closed tag at the end of cat photo URL and it says I need to include an attribute.

Please help

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="https://freecatphotoapp.com/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/86.0.4240.111 Safari/537.36.

Challenge: Use HTML5 to Require a Field

Link to the challenge:

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

After type="text" you’re closing input tag, so all the text after that is interpreted as a plain text.

Same thing I did but I keep getting a message that I need to include attribute in my input text. Should I reset the entire code?

Have you removed this sign?

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

When I did remove it, the tests passed.

Hi @hech :grinning:
Your code:

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

There is no need for this > after type="text" in your input element because if that is there, you have closed the input element and every other thing written after that would be read by the browser as text
So after you remove that your code should work and look like this:

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

:grinning: :grinning: :grinning: