For ID Challange

For ID Challange
0

#1

Tell us what’s happening:

Good evening, I wondered if someone could help me with the mark up with this challenge. Here is the challenge.

Camper Cat expects a lot of interest in his thoughtful blog posts, and wants to include an email sign up form. Add a for attribute on the email label that matches the id on its input field.

Below is my code. My issue is that i’m not sure what to match the For ID to and which For ID should be empty.

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="text">text:</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; 2016 Camper Cat</footer>
</body>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.

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

IF someone could help me with this issue, I would appreciate it, thank you.

Sincerely,

Mark Scott Benson


#2

Per the challenge instructions:

The value of the for attribute must be the same as the value of the id attribute of the form control.

The form control would be an input element in this case. See if you can solve the challenge now. If you have further questions, just ask.


#3

Dear Randell,

Thank you for your reply and your input. I see where I made my mistake. It was a capitalization issue, with the word email as the for attribute, and Email after the for attribute if that makes any sense. I appreciate you putting up with me and answering my questions.

Sincerely,

Mark Scott Benson


#4

I was referring to the fact that the for label above should be “email” which is the same value the id attribute has for the input element. Above you have for=“text”, which does not match the id=“email”.


#5

The correct code:
Email:


#6

The correct code:

<label for="email">Email:</label>
      <input type="text" id="email" name="email">