How to nest input element in form

**Tell us what’s happening:**i am unable to nest input element in form

Your code so far

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

<a href="#"><img src="" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
  <li>cat nip</li>
  <li>laser pointers</li>
<p>Top 3 things cats hate:</p>
  <li>flea treatment</li>
  <li>other cats</li>
<input type= "text" placeholder = "Cat photo URL">

<form action=""><"Cat photo URL"></form>


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.183 Safari/537.36.

Challenge: Create a Form Element

Link to the challenge:


Hi @Eeshan. You have done everything almost correctly, but there are some more things to do:

Why is there a separate “Cat Photo URL” inside the form element? I think you tried to nest it inside the form element, but instead of the “Cat Photo URL”, you need to put the EXISTING input element inside the form element.

If you don’t understand nesting, I will explain:

   <p> // this is now nested inside div.

In the example above, the p element is nested inside the div and becomes the children of div… Notice that the p element is placed between the opening <div> tag and the closing </div> tag. When you put an element inside another element’s opening and closing tags, that element is nested.

This is the same thing you need to do here.

Hope you understand.

nesting means nesting any tag into its parent tag
For Example


Now p is nested in its parent tag div

In your case

The input tag should be nested within the form tag.
It should be like

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

Hope this Helped

1 Like