I am having a problem in the lesson of Registration Form on step -18 . i fell that my code is correct why why is the error showing : The first input element should have an id of first-name.
MY CODE SOO FARhtml
<!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 id="first-name"></label>
<label>Enter Your Last Name: <input id="last-name"></label>
<label>Enter Your Email: <input id="email"></label>
<label>Create a New Password: <input id="new-password"></label>
</fieldset>
<fieldset></fieldset>
<fieldset></fieldset>
</form>
</body>
</html>
hi
I checked the challenge
it also asks you to use the for attribute on element label
link the input elements and the label elements together using the for attribute.
you did everything right until now but you haven’t completed it
EX: < label for=“Alphabet” >
I can’t be too specific
I’m allowed to give you an example
here’s a hint
to the current code you wrote
label element must also have a for attribute with first-name content as input
Hii… @Overdosse ummm actually i liked that you tried to help me but i didn’t understand what you wanted to say … but there was also on user named hbar1st… the reply he/she sent it worked … i thanked the user … not you …but yeahh I appreciate that you tried to help me … Thank you
I tried to be as subtle as possible
I don’t want to give you the whole solution
I wanted to let you think
I just gave you a hint
But as i said glad to help you
It sounds like there might be an issue with the id attribute of the first input element in your registration form. The error message you’re seeing, “The first input element should have an id of first-name,” suggests that the id of the first input element in your form is not set to “first-name.”
Please check that the id attribute of the first input element is correctly set to “first-name” and also make sure that it is unique across the entire HTML document.
It could also be possible that the input type is not set to “text”
You could also check that the input tag is properly closed and there is no typo in the code.
If you are still facing issues, please share the specific code you have written for the registration form. It will help me understand the problem and provide more specific advice.