Learn HTML Forms by Building a Registration Form - Step 31

My code won’t pass but everything looks ok. Line 24, the hint is saying I should use an ‘a’ element which I have done. Can anyone spot something I can’t? Thanks

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">I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/"> terms and conditions</a><input id="terms-and-conditions" type="checkbox" required /></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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

Learn HTML Forms by Building a Registration Form - Step 31

Your text is not in the correct place
“I accept the terms and conditions” should be coming after the closing of the input not before the input starts

1 Like

When I do that it says: You should only wrap the a element around the text terms and conditions .
This is my 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></label>

Welcome to the community @yf4q4k6jrc !

I believe Leader @Cody_Biggs is explaining to reset the step.
Then, place the text I accept the terms and conditions after the input element closing tag and before the closing label tag.

Then, as he has explained, place the anchor tags on each side of only the text ```terms and conditions.

Nothing else needs to be changed within the provided code at the beginning of the step.

Here is an example:

<p>Keep up <a href="https://freephotoapp.com">your good progress</a> on your coding journey.</p>

If this helps you move on, please check of ‘Solution by Cody Biggs’

I am only providing a bit of extra clarification.

1 Like

All you need to do here is remove the space that is before the word “terms” and it will pass

1 Like

Thanks alot! That works.

1 Like