Tell us what’s happening: I must be missing something obvious.
Describe your issue in detail here: I hav e been trying for days now to get past Step 30 in this lesson but cannot. I feel like I have tried every possible permutation of possibilities but but cannot get past the check code test to move on to step 31. Actually, I had this very same problem on Step 31 before, but I completely reset the lesson and started over to see if that would somehow fix the glitch. In my code as I have it here, I have manually closed out the inputs, but I have tried it with the regular notation style and I get the exact same message every time (see below) - I know this cannot by right because to start I DO, in fact, have a label element immediately after the third fieldset element.
Please help! I have been stuck for days now and it is driving me insane. I have read all the old fourm posts, one time I even read an old post where the person code that was identical to mine (that was the time when I was stuck on Step 31, not 30 like I am now after I reset the lesson) and it did not work for me. What I’m I doing wrong if I have known working code that doesn’t work when I have written the exact same code?
The response that I get from the freecodecamp.org page is this:
// running tests You should add anlabel after the third fields element.
You should add an input to the label element.
You should add a type attribute of value checkbox to the input element.
You should add a required attribute to the input element. The input element should have an id of terms-and-conditions. The label element should have a for attribute with a value of terms-and-conditions.
// tests completed
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>
<fieldset>
<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>
</fieldset>
<!-- User Editable Region -->
<fieldset>
<label for="terms-and-conditions" ><input id="terms-and-conditions" type="checkbox" required="yes" ></input></label>
</fieldset>
<input type="submit" value="Submit" >
<!-- User Editable Region -->
</form>
</body>
</html>
/* 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/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15
Challenge Information:
Learn HTML Forms by Building a Registration Form - Step 30