Tell us what’s happening:
Hello guys, I’m stuck in here, anyone to kindly show me what I’m doing wrong in this code.
Describe your issue in detail here.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registration Form</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1>Registration Form</h1>
<p>Please fill out this form with the required information</p>
<form method="post" action='https://register-demo.freecodecamp.org'>
<fieldset>
<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>
</fieldset>
<!-- User Editable Region -->
<fieldset>
<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"><input id="terms-and-conditions" type="checkbox" required /> I accept the terms and conditions</label>
<a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
</fieldset>
<!-- User Editable Region -->
<fieldset></fieldset>
<input type="submit" value="Submit" />
</form>
</body>
</html>
You should use an a element to link to the terms and conditions.
why does it keep on telling me this surely while I’ve used the “a tag”
I dont understand where am I going wrong?
<label <a for="terms-and-conditions" 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>
Still after doing that it didn’t work. Help me kindly I’m lost
You are trying to use a for in a anchor tag. Thats not how that works. The anchor tags needs to go around the text “terms and conditions” in the challenge
Right now, you are just adding the anchor tag before the actual text.
Honestly I’m lost, would you mind to just give me an example of what is expected of me, not necessarily a direct answer but a hint to enable me move forward for I’m stuck and I’ve tried my best please.
I would reset the lesson so you can start fresh. When you do you will have this line
<label for="terms-and-conditions"><input id="terms-and-conditions" type="checkbox" required /> I accept the terms and conditions</label>
Your anchor tag needs to start and end here
<label for="terms-and-conditions"><input id="terms-and-conditions" type="checkbox" required /> I accept the //start tag terms and conditions //end tag</label>
<label for="terms-and-conditions"><input id="terms-and-conditions" type="checkbox"/> I accept the terms and conditions// <a href="https://www.freecodecamp.org/new/terms-of-service/">terms and conditions</a> </label>
What could I possibly be doing wrong?
You are still adding the words “terms and conditions” You should not be adding any text in this challenge. The only thing you should be adding is the anchor tags
You should have only added the anchor tags in this line where I added the comments