I hope you will at least consider this…
I went back there to the cat photo step 55, it’s not the same scenario.
in the cat photo the input is not already inside a label element.
That is true. But hopefully now you know how to use the for attribute.
That code is not correct, but please don’t try to post solution code.
the code IS correct. but i will not post the solution. also after a week of trying the OP should be given an answer and explained how you got to the answer. in the real world teaching is not only about not giving the answer but about giving the answer when needed and followed through with more detail on how you arrived to the conclusion. thanks for your input
The code you posted was wrong.
Posting solutions for the OP is against the rules. Thank you for understanding.
I’m still stuck here.
What have you tried? What is your latest code?
<label>Enter Your First Name:<input id="first-name"<label for="first-name"Enter Your First Name:</label></label>
I see two labels? You should have one.
Also, your input element needs a >
Hello again @Trueq , hope you are doing well.
Let’s get this straight.
Do not add additional element. No adding new opening tag or closing tag. Leave the angled bracket as is.
You only need to add the for
attribute and the id
attribute to the respective elements.
You know how to add attributes to an element just like how you add src
to img
s and href
to a
elements.
Remember: id
goes to the input
and for
goes to the label
This is your given code
<label>Enter Your First Name: <input /></label>
I should not see missing brackets or forward slashes to this step.
Last call: Do not add or remove and element, the angled bracket should stay as is. You are not instructed to modify the elements hence the tags should stay as is.
You can do this!
I don’t know where to put the for attribute. for=“first-name”
<label>Enter Your First Name: <input id="first-name"/for="first-name"Enter Your First Name></label>
You put the for
attribute in label
element. Inside the angle bracket <
and >
after the name of the element.
Let me give you an example adding a href
attribute into the a
element.
<a>This is a link</a>
That is an anchor element.
Inside the opening tag, we insert the href
attribute and their value like this
<a href="link">This is a link</a>
Now you need to put the for
attribute into the label
element.
You can do this!
All html attributes are defined in the respective opening tags.
So src is in the opening tag of the a element
Class is in the opening tag of all elements
id is in the opening tag of all elements
And for
=> is in the opening tag of the label element.
OMG I DID IT.!!!
Believe it or not, you also did it back in step 55….(of the cat photo app…)
I kept looking at step 55 in the cat photo… just staring at it… but it was a little different, introducing the label, while this label was already there. threw me off.
Yes I get it.
You were struggling with a bigger scope.
forgive the Newbie Thank you to everyone that helped me. I’m sure you will hear a lot from me. Excuse me in advance