How to The existing input element should be nested 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>

<input type="text" placeholder="cat photo URL">
  <form 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:84.0) Gecko/20100101 Firefox/84.0.

Challenge: Create a Form Element

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

The more information you give us, the more likely we are to be able to help.

how to The existing input element should be nested within a form element.

Hey there @victor_oluwabaggi!

Nesting is a way of putting smaller child tags such as <input> into larger parent tags such as <form></form>

In this case you need to create a form element and then cut the <input> that’s already there. Putting the input into the form is called nesting and will make the code easier to read while allowing you to add more inputs into the form. BTW what I mean by putting the <input> in the form is to put it between the two <form> tags.

<main> 
<h1>Nesting into the main</h1>
<p> This is an example of nesting</p>
</main>

Happy Coding!
Best,
Cy499_Studios

Your input element is outside of your form element.
Here is the challenge that introduced “nesting” html elements:

Here’s an example:

<form (add actions here)>

add other things such as content and inputs here

</form>

i tried it,didnt work

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

done thanks for the help

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