Learn HTML Forms by Building a Registration Form - Step 17

Tell us what’s happening:
Describe your issue in detail here.

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'>
      <fieldset>
        <label for="first-name">Enter Your First Name: <input id="first-name" type="text"/></label>
        <label for="last-name">Enter Your Last Name: <input id="last-name" type="text"/></label>
        <label for="email">Enter Your Email: <input id="email" type="text"/></label>
        <label for="new-password">Create a New Password: <input id="new-password" type="text"/></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/107.0.0.0 Safari/537.36

Challenge: Learn HTML Forms by Building a Registration Form - Step 17

Link to the challenge:

Please 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 you say, the more we can help!

Tell us what’s happening:
Describe your issue in detail here.

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'>
      <fieldset>
        <label for="first-name">Enter Your First Name: <input id="first-name" type="text"/></label>
        <label for="last-name">Enter Your Last Name: <input id="last-name" type="text"/></label>
        <label for="email">Enter Your Email: <input id="email" type="text"/></label>
        <label for="new-password">Create a New Password: <input id="new-password" type="text"/></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/107.0.0.0 Safari/537.36

Challenge: Learn HTML Forms by Building a Registration Form - Step 17

Link to the challenge:

Please 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 you say, the more we can help!

Hi there. I didn’t mean to post this twice.

I am new to this forum, and did not see a way to post my comments/questions along with the code without it already posting. I still need to learn the set up of this forum in regards to posting.

Apologies in advance if I have posted the solution to this step given the code I presented. But I do not think that I have, since I keep receiving an error…

I have been stuck on this Step 17 on this Registration Form course.

It asks me to
" Nest an input element within each label . Be sure to add each input after the label text, and include a space after the colon."

So I initially tried the following below:

  <fieldset>
    <label>Enter Your First Name: <input type="text"/></label>
    <label>Enter Your Last Name: <input type="text"/></label>
    <label>Enter Your Email: <input type="text"/></label>
    <label>Create a New Password: <input type="text"/></label>
  </fieldset>

It says this isn’t right. So ok, no worries. I did more research.

I have researched and looked into other posts regarding this step and came to the conclusion that the code below in this post may be the correct answer.

  <fieldset>
    <label for="first-name">Enter Your First Name: <input id="first-name" type="text"/></label>
    <label for="last-name">Enter Your Last Name: <input id="last-name" type="text"/></label>
    <label for="email">Enter Your Email: <input id="email" type="text"/></label>
    <label for="new-password">Create a New Password: <input id="new-password" type="text"/></label>
  </fieldset>

But that still doesn’t work.

It gives me this hint :

Hint:

You should add the first input after the label text Enter Your First Name:, and include a space after the colon.

But I think that’s what I am doing??

I did not know if there is a bug for this step or not.

I would like more clarification perhaps on what I am missing, what I am doing wrong, and perhaps why such a thing is the correct answer.

I want to learn why for future projects and not simply just get the answer.
Thanks for your time. God bless.

This right here is actually really close - the tests were not expecting you to add a type attribute to these inputs.

ok I thought my original code was closer to what is expected of this step.

I’ve tried many variations of answers to this step and still come to the same error message and hint.

Did you try using the code I highlighted without the type attributes?

Yes, I think. I tried using the following for the 4 inputs

input type="text">
input type="first-name">
input id="">
input id="first-name"/>
input id="text"/>
input form="text"/>
input form="first-name"/>

Several others things as well, but I keep getting the hint below,

Hint

You should add the first input after the label text Enter Your First Name:, and include a space after the colon.

This hint either is not helpful at all or I am not seeing it…

Just the inputs. Add zero attributes.

sigh oh wow… thank you so much for your help. I got it now. It really was that obvious but I made it complicated :sweat_smile:. Have a blessed day.

1 Like

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