Learn HTML Forms by Building a Registration Form - Step 29

Tell us what’s happening:
Describe your issue in detail here.
In the second fieldset the error message is showing that my first ID should say “personal account” I have already written that

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><input type="radio" name="account-type" /> Personal Account</label>
        <label><input type="radio" name="account-type" /> Business Account</label>
        <label><input type="checkbox" required /> I accept the terms and conditions</label>
      </fieldset>
      <fieldset>
        <label for="personal-account"> personal-account <input id="personal-account"></label>
       <label for="business-account"> business-account <input id="business-account"></label>
        <label for="terms-and-conditions"> terms-and-conditions <input id="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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36

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

Link to the challenge:

You don’t want to add any new elements. I would restart the step to get the original HTML back. You only want to add the necessary for and id attributes to the existing elements in order to link them.

1 Like

in the exercise it said to add a new fieldset under the previous one

Follow accessibility best practices by linking the input elements and the label elements in the second fieldset.

Use personal-account, business-account, and terms-and-conditions as values for the respective id attributes.

Is this for step 29? I’m reading the instructions for step 29 and I do not see where it says that. It does say to link the labels to their inputs in the second fieldset. This means in the existing second fieldset. It does not mean to add a new fieldset.

i’m afraid i don’t understand… What is the second fieldset?

Let’s look at the existing HTML:

      <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>
      <fieldset>
        <label><input type="radio" name="account-type" /> Personal Account</label>
        <label><input type="radio" name="account-type" /> Business Account</label>
        <label><input type="checkbox" required /> I accept the terms and conditions</label>
      </fieldset>

Do you see two fieldset elements in this HTML?

I’m being shown only one fieldset in the activity box. But I see what you mean, second including the one above

there’s another fieldset above,
i think instructions is stating we should kinda replicate that first field into this 2nd field

Step 29

Follow accessibility best practices by linking the input elements and the label elements in the second fieldset.

Use personal-account, business-account, and terms-and-conditions as values for the respective id attributes.

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