Learn HTML Forms by Building a Registration Form - Step 31

Tell us what’s happening:

I can’t seem to figure out what the problem is here.
I keep getting an error: You should add : I accept the terms and conditions

Please help

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 for="terms-and-conditions"><input  id="terms-and-conditions" type="checkbox" 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; rv:126.0) Gecko/20100101 Firefox/126.0

Challenge Information:

Learn HTML Forms by Building a Registration Form - Step 31

This will be:
I accept the terms and conditionsterms and conditions

But the challenge wants this:
I accept the terms and conditions

You don’t need to add new text to make the link. Use the existing text to make it.

1 Like

I did that …now it says I should give the an href of “freeCodeCamp's Terms of Service

am not sure whats the issue now


can you post your new code?

here it is

I accept the terms and conditions

sorry not sure what happened there …let me re post as help.

Whenever you want to post code, wrap your code between backticks like this:


I think you did something like this:

I accept the <a>terms and conditions</a>

which is clearly missing the href attribute to specify the destination of the link.

1 Like

Thanks for the tip re posting code :pray:t5:

1 Like

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

You’re missing https://www. part at the beginning.


1 Like

Flippin hell :sweat_smile: at long last.

thanks a million :pray:t5: :pray:t5: :facepunch:t5:

Happy to help you.

Can you close the new topic you created as you should only have one topic for an issue ?

1 Like

…it’s giving me an error when I delete. …advise

No worries, I’ll do it


Thanks a million bro :pray:t5: :facepunch:t5:

1 Like