Trouble nesting form elements

I am trying to nest the input element inside the form element but its not working. I even tried closing the form element though the previous lessen said that input elements were self closing, but it didn’t work. I can’t see any problems with my opening and closing tags. Any suggestions would be much appreciated.


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="/"<input> type="text" placeholder="cat photo URL"</input></form>


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:

The term “self closing tag” refers to a tag that doesn’t need a closing tag, meaning it can terminate itself. The input tag is a self-closing tag, therefore, it doesn’t need a closing tag.
Just remove the closing tag from your code and you should be good to go!

A form tag is like this:

<form action="">
<input type=""> <!-- input tag is self-closing -->

You cant start a link with slash. A link starts like this:


Hi Acolak. Also be careful where you put the action, type, and placeholder. The action should go before the closing bracket of the form tag, and the type and the placeholder should go before the closing bracket of the input. (Before the >).

So it should look something like this:

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

And like Anindya said, you don’t need a closing input tag.

Thank you MrBondx, Anindya and Jill-Ann; thanks to you, I was able to complete the lessen.

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