Can anyone please tell me how to nest existing input element within form element in HTML and HTML5

Tell us what’s happening:

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>
<form action="">

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36.

Challenge: Create a Form Element

Link to the challenge:

This text will be blurred

Hi @Tanmay_Amkar, welcome to the forum.

“nesting” simply means “placed inside”, on in html terms found in between the opening and closing tag of another element.

For example this is an <a> element nested inside a <p>


In case of this challenge it expects the existing <input> to be nested inside a form element:

 <input />

Hope it helps :sparkles:

1 Like

what if it form element has action attribute?

That should make no difference. You can mix and match with any number of attributes, properties and what not, but IF an element is INSIDE another element, that’s “nested”, HTML speaking :slight_smile:

1 Like

i really tried everything but nothing is working . pls check my code so far and suggest some solutions :frowning:

You are really close you just deleted the input that FCC gave you.

Here is the original.
<input type="text" placeholder="cat photo URL">

Take the input and place it in between the two form tags like @Marmiz showed in the example above.

1 Like

thanks a lot @jwilkins.oboe and @Marmiz . finally i was able to complete the challenge .

1 Like

Hoorray! Glad to help!

1 Like