Building a Survey Form User Story #4 Problem

Tell us what’s happening:
Hello everyone,
The instruction for User Story #4 was to have an (id=“name”) right? When I add only an (id) it said I passed that test but when I add a (for) in the label as I was taught to always put, it said I failed but when I try to remove the (for) because maybe this test doesn’t want me to do that (other code has it though) and left only the (id=“name”), it still says that I failed this task. Really confused right now, any help would be appreciated.
Your code so far
Passed the other task so only showing my code for User Story #4:

Name:

Removed the (name)s cause I thought it was the problem.
Edit1: Uhh apparently the code I copied is not showing for me. Can anyone see it?
Edit2:Oh well adding a screenshot if it’s not visible.
Screenshot
Edit3: Corrected the <h1></h2> mistake.

Your browser information:

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

Challenge: Build a Survey Form

Link to the challenge:

First of all, if you want to put in code, you can use markdown formatting. With HTML you have to or it will try to interpret it. Put three backticks (```) on the line before your code block and three more on the line after.

As to your code, it’s hard to test without all the code. But right off the top I see that you have two elements with the same ID, “name”. IDs must be unique.

1 Like

Oh my, thank you! I thought label and input should have same (id) but just recalled it should be label for = input name and id. And also thank you for telling me how to make my code visible here. All good now. Back to learning.

1 Like

For anyone running into the same problem and reading this, aside from what Mr. kevinSmith said. You need to put the (id=“name”) in the input not in the label like what I did :smiling_face_with_tear:

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