Survey Form Label ID Attribute Issues

Hi guys. As a preface, I’m very new to all of this so forgive me if the solution is simple and I’m just not seeing it.

I’m having trouble clearing the test for this survey form because the label ID attribute isn’t registering as correct even though it’s identical with every other required label ID I’ve typed. I hope I’m describing this right but here’s some code snippets to help you better understand the confusion:


<!--EMAIL ADDRESS FIELD-->
		<label for="email" id="email-label">
			<input type="email" id="email" placeholder="Email Address" size="47" required>
			</label>

And the error:

  1. For the name, email, and number input fields inside the form I can see corresponding labels that describe the purpose of each field with the following ids: id=“name-label”, id=“email-label”, and id=“number-label”.
    #email-label should contain some text : expected 0 to be above 0

I’m using Google Chrome for this, Version 74.0.3729.131 (Official Build) (64-bit).

Here’s a link to my CodePendent Web Form:

codepen dot io slash Tanyx slash pen slash mgZmZe

Thanks for your help! Please have mercy!

Taye

try to give a name atr to your input with the same “for’s atr” in label.

<label for="email" id="email-label">
     <input type="email" name="email" id="email" placeholder="Email Address" size="47" required>
</label>

hope this would help you

Hi @Tayloryves,

You’re forgetting to add the label text:

 <label for="email" id="email-label">
			<input type="email" id="email" placeholder="Email Address" size="47" required>Email: </label>

I insert the text at the end but, you can put it on the beginning:

 <label for="email" id="email-label">Email: 
			<input type="email" id="email" placeholder="Email Address" size="47" required></label>

Regards!

I appreciate you guys! Thanks for being so nice.

Appending the label tags with actual text helped me pass this particular test, though it leads me to a question:

I liked how sleek it looked with the form being made solely of placeholder text. Getting the fields to line up nicely and using them to convey the message instead of adding text adjacent to them looks much nicer to me… Although, as I think about it, I’m aware that maybe that sleekness I like so much isn’t very accessible to users who would need more? I dunno… Anyway, as far as quality and usability goes, would the way I had things configured before be exceptionally bad in a professional setting? Or did I need to add additional text after the labels simply because the program testing my code was looking for a specific configuration?

Thanks again for all your help! I’m relieved I’ve passed, and now I can gussy it all up with some CSS woot!