Learn HTML Forms by Building a Registration Form - Step 30

Tell us what’s happening:
Describe your issue in detail here.
I’ve tried putting the anchor in three different places and it still comes up wrong. Where exactly should the anchor go for this code?
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>

<!-- User Editable Region -->

        <label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
        <label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
        <label for="terms-and-conditions"><a href="https://www.freecodecamp.org/news/terms-of-service/</a><input id="terms-and-conditions" type="checkbox" required /> I accept the terms and conditions</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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 Edg/117.0.2045.47

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

Link to the challenge:

Hi @Johndeveloper,

You are close to the solution! Just be sure to read the challenge carefully because it asks you to link only the words terms and conditions as a link inside of the label. Also, be sure that your anchor element is ended properly. The href attribute needs to end in a double quote " and then a >, then put anything inside the link, and end the link with </a>.

1 Like

I’ve tried it so many different ways in different places and still nothing. Where exactly is it supposed to go? Inside the first label of the third sequence or closing label?

I understand completely. It goes around the words “terms and conditions” inside of the label that is for terms-and-conditions but you only put it around those 3 words. If you’re still stuck, you can send me a message, and I can help you through it. We don’t like to have direct answers here on the forums.

This is what I have
<label for="terms-and-conditions" <a href"https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a> <input id="terms-and-conditions" type="checkbox" required /> I accept the terms and conditions</label>
am I supposed to remove the for attribute or not? I tried it both ways and still nothing? It keeps telling I should have an a tag. I know that something it glitches and I have to reset it to do it the same way I tried after editing. So is this correct?

This challenge is telling you to convert into link the text in this label attribute
I accept the terms and conditions

So kindly wrap the text inside this into an anchor tag.

Which you just put here <label for="terms-and-conditions"><a href="https://www.freecodecamp.org/news/terms-of-service/</a>

I hope you will change it and pass the test.

I’ve tried it every way possible and it still isn’t working. Could you give me an example of it’s supposed to look like?

See here you can see your text terms and conditions so you need to convert this one into link.

And to convert any text into link you do that it like

<a href="link>My World</a>

This how we convert our text into link.

So now wrap your text terms and conditions as l wrapped My World into anchor tag with href value.

Hope you understand.

I got it. I didn’t comprehend at first but now I understand. Thank you!

Glad to know that. Keep coding.

1 Like

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