Learn HTML Forms by Building a Registration Form - Step 18

My Question:
why is not passing, even though I have included the for attribute in the opening label element, and the id attribute in the input element. ERROR says:

“The first input element should have an id of first-name.”

<fieldset>
        <label for="first-name">Enter Your First Name: <input id="first-name" /></label>
        <label for="last-name">Enter Your Last Name: <input id="last-name" /></label>
        <label for="email" >Enter Your Email: <input id="email" /></label>
        <label for="new-password" >Create a New Password: <input id="new-password" /></label>
      </fieldset>

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0

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

Link to the challenge:

The HTML you pasted above seems right to me. Perhaps you accidentally changed something else that is causing the tests to fail. It is always a good idea to paste in all of your code, not just the part you are working on. That way we can help find accidental errors in other places.

ahh sory,
oke i will show all of my code…

<!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" /></label>
        <label for="last-name">Enter Your Last Name: <input id="last-name" /></label>
        <label for="email" >Enter Your Email: <input id="email" /></label>
        <label for="new-password" >Create a New Password: <input id="new-password" /></label>
      </fieldset>
      <fieldset></fieldset>
      <fieldset></fieldset>
    </form>
  </body>
</html>

Thanks. I just tested your HTML and it passes for me. Don’t know why it isn’t working for you. I’d just move on to the next step.

ahh never mind, I don’t know why, but after I rebooted my computer and went back to the website to try again without changing any code previously saved, it worked and passed. maybe my internet was slow that caused it to happen. thanks bro

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