Learn HTML Forms by Building a Registration Form - Step 29

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

Hello all.

im a little rusty as i havent been here for six months but trying to get back up and running now and i cant see my mistake.

The hint is : The first input element should have an id of personal-account.

Haven’t i done this?

Thanks :sweat_smile:

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" required /></label>
        <label for="last-name">Enter Your Last Name: <input id="last-name" type="text" required /></label>
        <label for="email">Enter Your Email: <input id="email" type="email" required /></label>
        <label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
      </fieldset>

<!-- User Editable Region -->

      <fieldset>
        <label for="personal-account"<input type="radio" name="account-type" id="personal-account"/> Personal Account</label>
        <label for="business-account"<input type="radio" name="account-type" id="business-account"/> Business Account</label>
        <label for="terms-and-conditions"<input type="checkbox" required id="terms-and-conditions"/> I accept the terms and conditions</label>
      </fieldset>

<!-- User Editable Region -->

      <fieldset></fieldset>
      <input type="submit" value="Submit" />
    </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:109.0) Gecko/20100101 Firefox/111.0

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

Link to the challenge:

hi there

you put id=“first-name”

you should use id=“personal-account”

Im sorry but I dont understand?

The hint says

The first input element should have an id of personal-account.

I’ve done this and ran the code but it still doesnt work?

What am I missing?

Thanks

You have several issues here, I will try my best to explain it all for you.

The first issue here is your label. Right now your labels look like this. The issue with the label is you dont have an ending > before the input begins. You need to add the end of the opening label which is > before your input begins

 <label for="personal-account"<input type="radio" name="account-type" id="personal-account"/> Personal Account</label>

The second issue is the end of your input you are using /> but it just needs to be >. So get rid of the slash at the end of the input before the text. Get rid of the slash below

<input type="radio" name="account-type" id="personal-account"/>
1 Like

Thanks so much.

I’m very rusty. :laughing:

1 Like

At least your getting back into it. Thats what matters

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