Learn HTML Forms by Building a Registration Form - Step 30

Tell us what’s happening:
Describe your issue in detail here.

What is wrong with this 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 </label>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

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

Link to the challenge:

I accept the terms and conditions

What is wrong with this code?

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

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

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

1 Like

You are missing the closing anchor tag?

<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> 
        </label>

The link text should not contain any extra spaces (delete the space to the left of terms and to the right of conditions)

the closing anchor tag should be before the text terms and conditions
< a href=“freeCodeCamp's Terms of Service” /a>terms and conditions

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