How do I nest input element into Form element

I don’t understand how to nest this into the existing input element?
" The existing input element should be nested within a form element."

What does that mean?

<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"></form>
  **Your browser information:**

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

Challenge: Create a Form Element

My code is:

<form action=""><input type=“text” placeholder="cat photo URL"></form>

I’ve been stuck on this for days

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

The example shows nesting:

<form action="/url-where-you-want-to-submit-form-data">

In this example, the nesting is the part were one element is in between the opening and closing tags of another element.

<parent element>
  <nested element>
</parent element>

That’s exactly what I did. But I still don’t have the right answer. I don’t understand what I am supposed to change?

I haven’t tested your code yet but I immediately noticed this

You need to turn off smart quotes.
Programming uses straight quotes like this

I edited your post to include the challenge link.

I just tested your code and that was the problem.

But also, you weren’t supposed to touch the input anyway.
You could reset the lesson and wrap the form tags around the input and it should pass.

1 Like

thank you so much. I honestly don’t know if I would have ever figured out that was the reason the code couldn’t pass. you rock!

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