Learn HTML Forms by Building a Registration Form - Step 31

Add the text I accept the terms and conditions immediately after the input element in the newly added label. Then link the text terms and conditions to the following location:


This is what i did and it did not pass. Please help.

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

Learn HTML Forms by Building a Registration Form - Step 31


Could you please submit your complete code to the post so we can provide guidance?

Hey! You can link post to your challenge by clicking on the help button appears when you try to check your code three time.

Hello @ajiboyeabosederachea !

This tutorial offers excellent examples and information on how to create links within sentences, as well as how to turn images into links.

Happy coding!

1 Like

it doesn’t go in a fieldset, and your anchor element is empty

It should go below the last fieldset element tags.

The anchors need to be placed on each side of the words

terms and conditions

while they remain within the statement.


<label>text <a href="url">text</a></label>

Happy coding!

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