How to Nest your text input element within a form element?

Tell us what’s happening:

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/create-a-form-element

Well, the instructions say:

Nest your text field inside a form element, and add the action="/submit-cat-photo" attribute to the form element.

So you are given code that includes the following line of code which we call a “text field”

<input type="text" placeholder="cat photo URL">
So you need to add code above and below that line to encase it in a ‘form’. The challenge explains how to declare a form. Try it and then post back with your effort and any problem you may still be having.

1 Like
<form action="/submit-cat-photo" <input type="text" placeholder="cat photo URL">
 </form>

That is my answer, but it’s not accepted. What is wrong?
Thanks in advance!
Untitled|690x418

1 Like

That’s not nesting.

Nesting in HTML means putting one set of tags into another. So the following is nesting an em element in a p element:

<p><em></em></p>

The ask is that your text field be nested in the form element. then add the attribute to the form element.

I uploaded a screenshot, because I cannot seem to be able to paste my code correctly. Please check my edited post :wink:

Thank you both. I got it :wink:

Just replying in case others search and need help. In the code above your beginning form element is incorrect. All elements must have a < and a >.

I am having trouble with ‘Nest your text input element within a form element’. I can’t see the code.

Hi there, if you look on the forum some more you will see examples showing how to nest.if that doesn’t help, try clicking the ask for help button so it will automatically post your code and a link to the challenge when you post your help request.

1 Like
input type="text" placeholder="cat photo URL">

This is what i have come up with but i guess it’s wrong

https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/create-a-form-element

A post was split to a new topic: Question about Create a Form Element challenge