Solution 1 :

This is how we nest input elements inside form tag,

<form action="/some/url">
  <input type="text">

Solution 2 :

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

HTML is like a tree. Add input element between <form></form>.

Solution 3 :

Place the <input> tag between the <form> and </form> tags, instead of inside the opening tag <form>.

Like this:

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

Problem :

I’m a beginner in HTML, and am learning more about it using freeCodeCamp. However there’s this one question I can’t get past. The question requires me to nest an input text type element inside a form element, but gives me an error even though I’m pretty sure that I wrote my code correctly. Could anyone possibly review it for me? Picture attached, HTML 5:



Comment posted by Merin Ovelil

your code is wrong .

Comment posted by stack snippet

Please do not post images of code — paste the code into the question, preferably as a

Comment posted by user12137152

Nesting doesn’t mean joining two tags to a single tag. It means place another element inside an element while keeping them seperate Make the line as

Comment posted by Nikhil Singh

You’re welcome! As you are a new contributor, just a suggestion, you can always mark the answer right if the answer helped you or upvote it if you think it was meaningful to you while solving the problem. Have a great time.