Input element within a form element

Tell us what’s happening:

   **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 action="text" placeholder="cat photo URL"></action>

</main>
<form action="https://freecatphotoapp.com/submit-cat-photo"></form>




   **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0.

Challenge: Create a Form Element

Link to the challenge:

There are a couple of problems here. First, you have more than one form. Also, when they say that the input should be nesting in the form, they don’t mean inside the definition of the form. The example they have is this:

<form action="/url-where-you-want-to-submit-form-data">
  <input>
</form>

This is closer to what you have:

<form action="/url-where-you-want-to-submit-form-data" <input>

I don’t know what this is:

</action>

You also changed the input’s type attribute to action - I don’t think inputs have an action attribute.


How to fix this. Well, you could reset the code and start from scratch. But if you understand, you could remove the second form, fix the input (restore it to what it was before), put the input in the proper place, get rid of the </action> tag and put a closing form tag there instead. I think that would do it.

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