Learn HTML Forms by Building a Registration Form - Step 18

Tell us what’s happening:
I’ve been on this for a week now and for the life of me can’t figure out what the problem is. Can somebody point me in the right direction with this ?

Your code so far

/* file: index.Ext.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 method="post" action='https://register-demo.freecodecamp.org'>
      <fieldset>
        <label for id="first-name">Enter Your First Name: <input /></label>
        <label for id="last-name">Enter Your Last Name: <input /></label>
        <label for id="email">Enter Your Email: <input /></label>
        <label for id="password">Create a New Password: <input /></label>
      </fieldset>
      <fieldset></fieldset>
      <fieldset></fieldset>
    </form>
  </body>
</html>
/* file: styles.Ext.css */
body {
  width: 100%;
  height: 100vh;
  margin: 0;
  background-color: #1b1b32;
  color: #f5f6f7;
}

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

Your mobile information:

TMRV06P5G - Android 14 - Android SDK 34

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

Link to the challenge:

Hi, from what I can see your inputs don’t have any attribute like “id”… plus for is an attribut itself i don’t think you need to add “id” after “for”

2 Likes

Hi there!
You need to add same value within label and it’s corresponding input, as for and id attribute.
for attribute is for label and id attribute is for input elements