Learn HTML Forms by building a Registration Form

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.

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Registration Form</title>
    <link rel="stylesheet" href="styles.css" />
    <h1>Registration Form</h1>
    <p>Please fill out this form with the required information</p>
    <form action='https://register-demo.freecodecamp.org'>
        <label id="first-name">Enter Your First Name: <input /></label>
        <label id="last-name">Enter Your Last Name: <input /></label>
        <label id="email">Enter Your Email: <input /></label>
        <label id="new-password">Create a New Password: <input /></label>

Hi, please, next time when you post your question, provide it with a specific question.
Asking a better question will help you understand your current situation.

We can’t see your code.

Please edit your post and paste your code inside of it

1 Like

Hi @Lahari

Can you please provide a link to your problem…

As for the problem itself, remember strongly: id attribute is for input elements. for attribute is for the label elements.

Hope it helps :grin:

1 Like

Add the ID to the input element as the instruction ask you to do

1 Like

Hello, way to go! Please remember that posting solutions in the forum is not super-helpful for others who are also here trying to learn.
Thanks for your understanding (I have edited the last post to remove the solution)