Tell us what’s happening:
Step 17 of building a registration form said my code was good but then it was changed in step 18.
Describe your issue in detail here. My issue is with the input elements. In step 17 I entered them such as:
<fieldset>
<label>Enter Your First Name: <input></label>
<label>Enter Your Last Name: <input></label>
<label>Enter Your Email: <input></label>
<label>Create a New Password: <input></label>
</fieldset>
It said my code was good and allowed me to go to step 18 but on step 18 the input labels were changed to something I haven’t studied yet. I tried searching google but couldn’t find the answer.
This is what step 18 changed it to:
<fieldset>
<label>Enter Your First Name: <input /></label>
<label>Enter Your Last Name: <input /></label>
<label>Enter Your Email: <input /></label>
<label>Create a New Password: <input /></label>
</fieldset>
My question is why has the input element which is a self closing tag been changed from
<input> to <input />
after I was told I was correct and allowed to move on. I noticed another space before the backslash. Also the backslash is at the end after a space and not in the front of the input element which is how I have seen it in closing elements even though input is a self closing element to my understanding.
So my question is do I need to be concerned with this at this point and the answer will turn up later or is there a reason for this? Thank you in advance
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>Enter Your First Name: <input /></label>
<label>Enter Your Last Name: <input /></label>
<label>Enter Your Email: <input /></label>
<label>Create a New Password: <input /></label>
</fieldset>
<!-- User Editable Region -->
<fieldset></fieldset>
<fieldset></fieldset>
</form>
</body>
</html>
/* file: styles.css */
body {
width: 100%;
height: 100vh;
margin: 0;
background-color: #1b1b32;
color: #f5f6f7;
}
label {
display: block;
margin: 0.5rem 0;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0
Challenge Information:
Learn HTML Forms by Building a Registration Form - Step 18