Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
/* file: index.html */
<link rel="stylesheet" href="styles.css" />
<p>Please fill out this form with the required information</p>
<label>Enter Your First Name: <input for="first-name_id" /></label>
<label>Enter Your Last Name: <input for="last-name_id" /></label>
<label>Enter Your Email: <input for="email_id" /></label>
<label>Create a New Password: <input for="new-password_id" /></label>
/* file: styles.css */
margin: 0.5rem 0;
**Your browser information:**
User Agent is:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
Challenge: Learn HTML Forms by Building a Registration Form - Step 17
Link to the challenge:
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 information you give us, the more likely we are to be able to help.
after the input I put the for attribute with "first-name"and so, on bit I keep getting that error.
You are modifying the for attribute here, instead of creating an id attribute.
is that the correct way for the for attribute?
No. The Step is not asking you to add the for attribute like that. You shouldn’t stick the id part on there.
input element should have an
Sure, that’s correct. You did not add an id attribute.
id and for are two separate attributes.
Following accessibility best practices, link the
input elements and the
label elements together using the
new-password as values for the respective
Look back at previous projects. How did you use for and id together on label+ input pairs previously?
Let’s try looking at a previous project
I see an input element on line 49. Do you see it?
Loving is capitalized. Am I getting warmer?
Do you see the id and for attributes there? They are part of two separate elements. Which element gets the id and which one got the for attribute?
So which element has the id attribute? Which element has the for attribute?
You need to add 3 id attributes and 3 for attributes.
They should go on the inputs and labels similar to how to did it for the Cat Photo App project.
id is input and for is label
So you need to add those id and for attributes to these 3 labels and 3 inputs.
can you put a label inside a label? or write it on the next line.
You don’t need to move the labels.
There are 4 (I miscounted earlier) pairs of labels and inputs.
All of need to do is add id attributes to the inputs and matching for attributes to the labels.
I think that you are making this more complicated that you need to. Don’t move any elements around.
@Trueq simply follow the instruction, label and input have separate attributes but same value, for and Id attribute goes to separate elements. remove the _id attached to all values. I hope this clue helps.