Improve Form Field Accessibility with the label Element help

Tell us what’s happening:
here am not able to matches the id inside for tag somebody please help me out

Your code so far


<body>
  <header>
    <h1>Deep Thoughts with Master Camper Cat</h1>
  </header>
  <section>
    <form>
      <p>Sign up to receive Camper Cat's blog posts by email here!</p>
      
      
      <label for="name">Email:</label>
      <input type="text" id="Email" name="Email">
      
      
      <input type="submit" name="submit" value="Submit">
    </form>
  </section>
  <article>
    <h2>The Garfield Files: Lasagna as Training Fuel?</h2>
    <p>The internet is littered with varying opinions on nutritional paradigms, from catnip paleo to hairball cleanses. But let's turn our attention to an often overlooked fitness fuel, and examine the protein-carb-NOM trifecta that is lasagna...</p>
  </article>
  <img src="samuraiSwords.jpeg" alt="">
  <article>
    <h2>Defeating your Foe: the Red Dot is Ours!</h2>
    <p>Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightening speed. But chin up, fellow fighters, our time for victory may soon be near...</p>
  </article>
  <img src="samuraiSwords.jpeg" alt="">
  <article>
    <h2>Is Chuck Norris a Cat Person?</h2>
    <p>Chuck Norris is widely regarded as the premier martial artist on the planet, and it's a complete coincidence anyone who disagrees with this fact mysteriously disappears soon after. But the real question is, is he a cat person?...</p>
  </article>
  <footer>&copy; 2018 Camper Cat</footer>
</body>

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-accessibility/improve-form-field-accessibility-with-the-label-element

Hey @Gunjan,
Read the instructions carefully and you will come to know that this label tag should have different value for “for” attribute and not “name”.
Does that help?

i tried so many ways still not working help me out

Try changing this for attribute value to “Email”.

Email:

two years later so i’m assuming you figured this one out already but the following is the correct code:
Email:

1 Like

yeah but thanks anyway

1 Like

Case is matter, put “email” in for attribute in label then it connects to the id of the input.

<label for="email"></label>
<input id="email">

email is not the same for Email, whuch has uppercase.

you have to put your input emlement between your label element:
as example:

<label for='email'>
<input id='email'>
</label>