Learn HTML Forms by Building a Registration Form - Step 18

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

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>Enter Your First Name: <input for="first-name" /></label>
        <label>Enter Your Last Name: <input for="last-name" /></label>
        <label>Enter Your Email: <input for="email" /></label>
        <label>Create a New Password: <input for="new-password" /></label>
      </fieldset>
      <fieldset></fieldset>
      <fieldset></fieldset>
    </form>
  </body>
</html>
/* file: styles.Ext.css */
<!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>Enter Your First Name: <input for="first-name" /></label>
        <label>Enter Your Last Name: <input for="last-name" /></label>
        <label>Enter Your Email: <input for="email" /></label>
        <label>Create a New Password: <input for="new-password" /></label>
      </fieldset>
      <fieldset></fieldset>
      <fieldset></fieldset>
    </form>
  </body>
</html>

Your mobile information:

SM-A022F - Android 11 - Android SDK 30

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

Link to the challenge:

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

the id attribute is for input element
and for attribute is for label element

and to link the label to the input element, both for and id attributes must be identical.

Example:

<label for="name">Your Name: <input id="name" /></label>

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