Build a Registration Form Using HTML- step 30

Step 30

You need to confirm that the user has read the terms and conditions.

Add a label element. Inside the newly created label element add an input element and set the type attribute to checkbox. Make this input element required so users can not sign up without agreeing to the terms and conditions.

Add an id and for attribute with the value terms-and-conditions to the elements for accessibility.

My code is:

<fieldset>
    <legend>Account type (required)</legend>
    <input type="radio" id="personal-account" name="account-type" checked /><label for="personal-account">Personal</label>
    <input type="radio" id="business-account" name="account-type" /><label for="business-account">Business</label>
</fieldset>

<fieldset>
    <legend>Terms and Conditions</legend>
    <input type="checkbox" id="terms-and-conditions" name="terms-and-conditions" required /><label for="terms-and-conditions">I have read and agree to the terms and conditions</label>
</fieldset>

<fieldset>
    <legend>Additional Information</legend>
    
</fieldset>

<label for="additional-info">Additional Information:</label>

What is wrong? Can someone help me? I have tried many variants already

Please post a link to the Step. Thanks

Add a label element.

Inside the newly created label element add an input element and set the type attribute to checkbox.

Make this input element required so users can not sign up without agreeing to the terms and conditions.

I would handle each sentence one at a time. Your new input is not inside your label, you went awry on the second sentence.

2 Likes

If you didn’t write what was requested, it shouldn’t pass. That sounds like a curriculum bug.