Error in field creation

Tell us what’s happening:
Describe your issue in detail here.

For example, if you wanted to make a text input field required, you can just add the attribute required within your input element, like this: <input type="text" required>
Your code so far
it keeps on showing errors


<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" 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://www.freecatphotoapp.com/submit-cat-photo">
  <input type="text" alt="required">
  <button type="submit">required</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/96.0.4664.110 Safari/537.36

Challenge: Use HTML5 to Require a Field

Link to the challenge:

Hello @mondengjux !

  1. You must write required between <>, no after them.

Example:
<input type="number" required>

  1. Use required for input, no for button.

It seems you forgot to add the required attribute to your image.

Format →

<input type="text" alt="myinput" required>

thanks, it worked out and i figured out where i was messing up

1 Like

thanks for the help

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.