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?

<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>

<form action="https://freecatphotoapp.com/submit-cat-photo"><input type=“text” placeholder="cat photo URL"></form>
</main>
  **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="https://freecatphotoapp.com/submit-cat-photo"><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">
  <input>
</form>

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.