Learn HTML Forms by Building a Registration Form - Step 31

Tell us what’s happening:

Hi, I am having trouble with the terms and conditions portion. I keep receiving this message: “You should add I accept the terms and conditions text to the label following the third fieldset.”

Here is my code:

I accept the terms and conditions

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>

<!-- User Editable Region -->

        <label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
  <label for="personal-account">
    <input id="personal-account" type="radio" name="account-type" /> Personal Account
  <label for="business-account">
    <input id="business-account" type="radio" name="account-type" /> Business Account
  <label for="terms-and-conditions"><input id="terms-and-conditions" type="checkbox" required /> I accept the<a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>

<!-- User Editable Region -->

      <input type="submit" value="Submit" />

Hi, welcome to the forum! :wave:

Which Step # are you on?

You could try following the exact same format (spaces and returns) as the previous labels

1 Like

Hi! I am on step 31. The terms and conditions portion

Check your spacing, you have a space missing in the sentence around the <a tag.

Screenshot 2024-06-04 101044

Thank you for your reply. Unfortunately that did not fix it either

Please share your updated code?

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

I would reset the challenge. You changed the order of the html in the code. Reset, and then only make the change you need to


This passes the test for me, but without the fieldset tags.

If I just copy the label tag and everything within, it works. There should be a set of empty fieldset tags in the code above the editable region.