Learn HTML Forms by Building a Registration Form - Step 31

Tell us what’s happening:

Describe your issue in detail here.
“You should add I accept the terms and conditions text to the label following the third fieldset”
The code looks good for me but i dont know this error keep popping out everytime anyone can please explain me whats wrong here? :smiley:

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Registration Form</title>
    <link rel="stylesheet" href="styles.css" />
    <h1>Registration Form</h1>
    <p>Please fill out this form with the required information</p>
    <form method="post" action='https://register-demo.freecodecamp.org'>
        <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>
        <legend>Account type (required)</legend>
        <label for="personal-account"><input id="personal-account" type="radio" name="account-type" checked /> Personal</label>
        <label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business</label>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

      <input type="submit" value="Submit" />
/* 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/ Safari/537.36

Challenge Information:

Learn HTML Forms by Building a Registration Form - Step 31

You appear to have created this post without editing the template. Please edit your post to 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!

2 things that I notice. It said add the text immediately after the input element, so remove the space between the text and the input element.
Another one, which I think is the main one, is you you don’t need to write ‘terms and conditions’ twice in that sentence. The entire purpose of this step was to make it so that you can make the text ‘terms and conditions’ clickable, that’t it. :slight_smile:

Welcome to the freeCodeCamp community. You need to wrap the existing terms and conditions text within the anchor tag,remove the extra terms and conditions tex,t and need terms-and-conditions width id and name attributes as value also. Hope you find my answer helpful. Happy Coding.

1 Like

Hi, the following is my code, i dont know where i do something wrong. I cant get to the next step :frowning:

hey @neolus2301 , welcome to the forum! Please open your own topic to ask for help!

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

here, still the code isnt running i gave label a “For” attibut but sill this code is not working i also tired chat gpt code but it still says “youre code doesnt passed”

can u pls write this code so i can see the deffernce in my code and yours🙂?

Hi @LazyAman

The error message says:

Try placing the closing fieldset tag above the label element.

Happy coding

Your code should be within the fieldset opening and closing this.

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