Learn HTML Forms by Building a Registration Form - Step 16

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Registration Form</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <h1>Registration Form</h1>
    <p>Please fill out this form with the required information</p>
    <form action='https://register-demo.freecodecamp.org'>
      <fieldset>
       <input><label>Enter Your First Name:</label></input>
        <input><label>Enter Your Last Name:</label></input>
         <input><label>Enter Your Email:</label></input>
         <input><label>Create a New Password:</label></input>
      </fieldset>
      <fieldset></fieldset>
      <fieldset></fieldset>
    </form>
  </body>
</html>
/* file: styles.css */
body {
  width: 100%;
  height: 100vh;
  margin: 0;
  background-color: #1b1b32;
  color: #f5f6f7;
}

label {
  display: block;
  margin: 0.5rem 0;
}

Your browser information:

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

Challenge: Learn HTML Forms by Building a Registration Form - Step 16

Link to the challenge:

in html in fieldset section i am stuck
i have to nest label with input how can i ?

You have followed the instructions in reverse.

Nest an input element within each label . Be sure to add each input after the label text, and include a space after the colon.

They want the input to be within the label.

1 Like

i trie but still not working can you give me one example

Show me what you tried.
(It should be just adding label to the outside of each line instead of having the input to the outside which is what you had. Just restart the step and do the opposite of what you did )

 <fieldset>
        <label><input>Enter Your First Name:</label></input>
        <label><input>Enter Your Last Name:</label></input>
        <label><input>Enter Your Email:</label></input>
        <label><input>Create a New Password:</label></input>
      </fieldset>

The closing tags are still in reverse

   <fieldset>
        <label><input> Enter Your First Name:</input></label>
        <label><input> Enter Your Last Name:</input></label>
        <label><input> Enter Your Email:</input></label>
        <label><input> Create a New Password:</input></label>
      </fieldset>

here we go

Are you still unable to pass?

yes sir
code i posted on up

Did you check the hints?

Also reread the exercise as you forgot to do something they asked for.

hint saying this

You should add the first input after the label text Enter Your First Name: , and include a space after the colon.

Yes. Read that hint carefully. It is telling you something you have not done.

Mod edit: solution removed


this is solution but you dont tell me that input is self closing

Yes sorry . I forgot about that…

1 Like

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