Trying to nest an input element within a label element but not passing

Tell us what’s happening:
I was able to add the <input> box on the same line with the label. But my code doesn’t pass.
“Hint:”
You should add the first input after the label text Enter Your First Name: , and include a space after the colon.

This is the section of code I’m working on:

<fieldset>
       <label>Enter Your First Name:  <input>
       </label>
       <label>Enter Your Last Name: <input>
       </label>
   **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html>
 <head>
   <title>Registration Form</title>
	  <link rel="stylesheet" type="text/css" href="styles.css" />
 </head>
 <body>
   <h1>Registration Form</h1>
   <p>Please fill out this form with the required information</p>
   <form action='https://register-demo.freecodecamp.org'>
     <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>
     <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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36

Challenge: Step 15

Link to the challenge:

Hi @NakedGrammer
There is 2 spaces before the first input I think. Need only one space there.

Thanks, I noticed and fixed that but same error message.

the new line of label close tag also involve some spaces there, try put on one line like this
<label>Enter Your First Name: <input></label>

1 Like

I got it. Supposed to look like;

      <fieldset>
        <label>Enter Your First Name: <input /></label>
        <label>Enter Your Last Name: <input /></label>
1 Like

Appreciate your help!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.