Design a Registration Form - Step 27

Tell us what’s happening:

I am stuck in step 27 in Registration Form module. I follow the steps but still have an error. " You should have an an element right before the label with the text Read our terms and conditions."

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>
      <fieldset>
        <legend>Account type (required)</legend>
        <label for="personal-account"><input id="personal-account" type="radio" name="account-type" value="personal" checked /> Personal</label>
        <label for="business-account"><input id="business-account" type="radio" name="account-type" value="business" /> Business</label>

<!-- User Editable Region -->

        <a href="https://www.freecodecamp.org/news/terms-of-service/">Read our terms and conditions</a>
       <label for="terms-and-conditions"><input type="checkbox" id="terms-and-conditions" required>I accept the terms and conditions</label>
      </fieldset>
       
      <fieldset></fieldset>


<!-- User Editable Region -->

      <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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15

Challenge Information:

Design a Registration Form - Step 27

These lines of code were before the edit area of your starting code, but here they are after the edit area. I suggest resetting the step to restore the original code then try again. All of the code you added looks good; it’s just in the wrong place.

Hello, I have no luck. I reset it and type back again the code, still the same problem.

“You should have an a element right before the label with the text Read our terms and conditions.”

Please post your updated code.

1 Like

Hi, this the updated code. Same problem.

Registration Form

Registration Form

Please fill out this form with the required information

Enter Your First Name:

Enter Your Last Name:

Enter Your Email:

Create a New Password:

Account type (required)

Personal

Business

Read our terms and conditions

I accept the terms and conditions

Registration Form

Registration Form

Please fill out this form with the required information

Enter Your First Name:

Enter Your Last Name:

Enter Your Email:

Create a New Password:

Account type (required)

Personal

Business

Read our terms and conditions

I accept the terms and conditions

When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

1 Like
<!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>
      <fieldset>
        <legend>Account type (required)</legend>
        <label for="personal-account"><input id="personal-account" type="radio" name="account-type" value="personal" checked /> Personal</label>
        <label for="business-account"><input id="business-account" type="radio" name="account-type" value="business" /> Business</label>
        <a href="https://www.freecodecamp.org/news/terms-of-service/">Read our terms and conditions</a>
        <label for="terms-and-conditions"><input type="checkbox" id="terms-and-conditions" required>I accept the terms and conditions</label>
      </fieldset>
      <fieldset></fieldset>
      <input type="submit" value="Submit" />
    </form>
  </body>
</html>

Did you reset this step? I see no change.

1 Like

Tell us what’s happening:

This is the updated Registration Form code. Error in step 27.
Please help, thank you.

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>
      <fieldset>
        <legend>Account type (required)</legend>
        <label for="personal-account"><input id="personal-account" type="radio" name="account-type" value="personal" checked /> Personal</label>
        <label for="business-account"><input id="business-account" type="radio" name="account-type" value="business" /> Business</label>
        <a href="https://www.freecodecamp.org/news/terms-of-service/">Read our terms and conditions</a>
        <label for="terms-and-conditions"><input type="checkbox" id="terms-and-conditions" required>I accept the terms and conditions</label>
      </fieldset>

<!-- User Editable Region -->

      <fieldset></fieldset>

<!-- User Editable Region -->

      <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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15

Challenge Information:

Design a Registration Form - Step 27

hello! please take reference from this, and switch the positions of these tags accordingly. Also try to keep changes limited to the User Editable Region in future.

2 Likes

Please do not create duplicate topics for the same step/challenge. I have merged the posts from your duplicate topic into this thread.

1 Like
Hello, I apologize, I duplicated the topics. This is my first time engaging here. Anyways thank you, I got it now.