Debug a Donation Form - Debug a Donation Form

Tell us what’s happening:

On “Debug a Donation Form”, I am getting an error:

“Your second input element should have a name attribute with a value of email.”

(Also, it tells me:
4. Your second input element should have a name attribute with a value of email.
Failed: 5. Your third input element should have a name attribute with a value of amount.
Failed: 6. Your fourth input element should have a name attribute with a value of newsletter.)

I am 100% confident that I do have them set properly. Can anyone look into this?

Your code so far

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Donation Form</title>
</head>
<body>
  <h1>Donation Form</h1>
  <form>
    <label for="name">
    Full Name:
    <input type="text" name="name" id="name" required>
    </label>
    <label for="email">
    Email Address:
    <input type="email" name="email" id="email" required>
    </label>
    <label for="donation-amount">
    Donation Amount ($):
    <input type="number" name="amount" id="donation-amount" required>
    </label>
    <label for="subscription">
    <input type="checkbox" name="newsletter" id="subscription">
    Subscribe
    </label>
    <input type="submit" value="Send">
  </form>
</body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0

Challenge Information:

Debug a Donation Form - Debug a Donation Form

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-debug-donation-form/690ddb5e6ee94eb73ed172b0.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome back @programlegion,

Try not wrapping your input elements in label elements.

Happy coding

Thanks. was under the impression that wrapping them is best practise, but thinking about it, it makes sense that if we wrap them, we don’t need the for attribute.
Thanks again!

That’s a good observation.