Learn HTML Forms by Building a Registration Form - Step 17

Tell us what’s happening:
I am stuck on this step for three days .i have tried several ways

Your code so far

<label id="Enter Your First Name:" <label id= "Enter Your Last Name:" <label id= "Enter Your Email:" <label id= "Create a New Password:"
<!-- 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>
         <label id="Enter Your First Name:" <for="first-name"/></label>
      <label id= "Enter Your Last Name:" <for="last-name"/></label>
      <label id= "Enter Your Email:" <for="email"/></label>
      <label id= "Create a New Password:" <for="new-password"/></label>
      </fieldset>
     
      <fieldset></fieldset>
      <fieldset></fieldset>
       <input type="submit"value="submit"/>
    </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

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

Link to the challenge:

Okay pls reset this step as you are not on the right track.

If you can go back to step 56 of the cat photo app, it will remind you how to use the for attribute in the label to associate that label to an input (using its id).

This step is just repeating that concept.

i think i am confused or missing something small i went back like previous reader said this is my code now

<fieldset>
        <label for="Enter Your First Name:">Enter Your First Name:<input id="first-name" type="first-name"</label>
       <label for="Enter Your Last Name:">Enter Your Last Name: <input id="last-name" type="last-name"</label>
        <label for "Enter Your Email:" >Enter Your Email: <input  id="email" type="email"</label>  
        <label for = "Create a New Password:">Create a New Password:<input id="new-password" type="new-password"/></label>
      </fieldset>

The value of the for attribute should match the value of the id attribute

1 Like

i figured out what i was doing wrong

Enter Your First Name: Enter Your Last Name: Enter Your Email: Create a New Password:

do you mean deleting this statements from the syntax?

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

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