<fieldset>
<label for"firstname" id="first name">Enter Your First Name:
<input type="text">
<label for"lastname"id="last name">Enter Your Last Name:
<input type="text">
<label for"email" id="email">Enter Your Email:
<input type="email">
<label for"newpassword" id="new password">Create a New Password:
<input type="new password">
</fieldset>
just don’t know what i am doing wrong
Your 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 for"firstname" id="first name">Enter Your First Name:
<input type="text">
<label for"lastname"id="last name">Enter Your Last Name:
<input type="text">
<label for"email" id="email">Enter Your Email:
<input type="email">
<label for"newpassword" id="new password">Create a New Password:
<input type="new password">
</fieldset>
<!-- User Editable Region -->
<fieldset></fieldset>
<fieldset></fieldset>
</form>
</body>
</html>
Hello and welcome to the forum.
The id attributes should be in your input elements, not in your label element.
In your label elements your for attribute needs an = that gives the value.
Also check the instructed values, and the values that you have. It has to be the exact same like how it is in the instruction. You are missing the -
I recommend you reset your code and try again.
Here is an example: <label for="blue-curtain">Blue Curtain <input type="_" id="blue-curtain">
When you write a value that has more then one word, the words should be separated by a - dash and the attribute should always have = equal sign before it’s value.
Yes of course. When ever you want to add attribute that need a value, what ever attribute you adding that need a value. You need to add always equal sign after that before it’s value.
in HTML, we have tags like <input and <img which don’t have equal signs and we have attributes which almost always need an equal sign and a value such as for href="something" or id="" and for the attribute called for as well.
for the challenge step your id attribute and it’s value will be goes within the input elements. It would be better to reset your code and try from start to add the for and id attribute with it’s value to exact label and input elements.
Enter Your First Name:
Enter Your Last Name:
Enter Your Email:
Create a New Password:
it tells me that the first input should have an id of first name?
Your 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 for="first name">Enter Your First Name:<input id="first name">
<label for="last name">Enter Your Last Name:<input id="last name">
<label for="email">Enter Your Email:<input id="email">
<label for="new password">Create a New Password:<input id="new password">
</fieldset>
<!-- User Editable Region -->
<fieldset></fieldset>
<fieldset></fieldset>
</form>
</body>
</html>
In general, the attribute called id can be added to any opening tag for any html element.
You should check the step’s instructions to see what they want you to do (the location asked by different steps will depend on the step). But in general, all attributes must be placed in the appropriate opening tag.
not quite! It says first-name
notice there is a dash in the middle!
I will be closing this duplicate version of your question which you started in a different post. Please do not open duplicate posts in future for the same issue. (all duplicates are now merged into one forum topic)