Learn HTML Forms by Building a Registration Form - Step 18

Description of my ERRORR

So I’m STUCK. I was doing and practicing all the steps, and suddenly…
I am stuck here. I am stuck at the for and id attributes.() iindicate stuck places in my code.

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 method="post" action='https://register-demo.freecodecamp.org'>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

      <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;
}

Browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0

Challenge Information:

Learn HTML Forms by Building a Registration Form - Step 18

STEP INFORMATION (USELESS):

Following accessibility best practices, link the input elements and the label elements together using the for attribute.

Use first-name, last-name, email, and new-password as values for the respective id attributes.

link the input elements and the label elements together using the for attribute

<label for="">text</label>
          <input id="">
2 Likes

Thanks a lot. I was stuck here. I just couldn’t understand what the id and for attributes belonged to.

2 Likes

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