Create an Form Element

Tell us what’s happening:
The existing input element should be nested within a form element.
i don’t know how to do it. I tried many ways but none of them are correct, if anyone knows how to do it can you help me? Thank you

  **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 input action="https://freecatphotoapp.com/submit-cat-photo">  
</form>
</main>
  **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:

You forgot to fill in the Tell us what’s happening section!

It looks like you did not

Nest the existing input element inside a form element

And how do i nest the existing input inside a from?

You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action attribute on your form element.

For example:

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

I did exactly the same and it’s not working i don’t know what i’m doing wrong…

Nest the existing input element inside a form element and assign "https://freecatphotoapp.com/submit-cat-photo" to the action attribute of the form element.

Example:

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

Yours:

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

These two are not exactly the same. You have not nested the existing input inside of the new form opening and closing tags. You cut the word input out of the input tag and put it inside of the form tag.


This is the original input element:

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

It worked now. Thank you so much for your help

1 Like