Jsam94
October 3, 2022, 7:44pm
1
Hello, can’t seem to understand what I’m doing wrong on this one if anyone can help?
<input id="loving" type="checkbox"> <label for="Loving" Loving </label>
Hint
The text Loving
should be nested within the new label
element. You have either omitted the text or have a typo.
Remember to close >
the starting label
tag.
The new label
element should have a for
attribute with the value loving
. Expected loving
, but found Loving
.
The for
attribute starting letter case matters.
Jsam94
October 3, 2022, 9:15pm
3
Hey, thanks for your response. It still doesn’t seem to work, whenever I delete the close > next to the label element, everything goes black again.
<input id="loving"type="checkbox"><label>for="loving"loving</label>
The for
attribute should be inside the starting <label>
tag. As all attributes are.
Example:
<input id="name" type="text"><label for="name">Enter name:</label>
Jsam94
October 3, 2022, 9:31pm
5
<input id="loving"type="checkbox"><label for="loving" >loving</label>
Sorry still can’t get it! IT all looks like it should work without the > between the second two lovings as all red and blue but then when I add the > as per your response, everything goes black /:
nesting the text Loving
in a label
element
Capital L for the label text Loving
Make sure there is a space between the two elements.
The same example as before but with a space just in case it isn’t clear
<input id="name" type="text"> <label for="name">Enter name:</label>
FYI. I’ve edited your code for readability.
Use the “preformatted text” tool in the editor (</>
) to add backticks around the code to get the proper code formatting.
Jsam94
October 3, 2022, 9:44pm
7
Sorry, I’m really trying but I’m just not getting it…
I have amended the label Loving to a capital letter & added a space between the elements.
<input id="loving" type="checkbox"> <Label for="loving"> Loving</Label>
````Preformatted text`
The element name is label
not Label
Jsam94
October 3, 2022, 9:48pm
9
I swear I tried that before and it didn’t work! ha It’s done, thank you so much!
1 Like
system
Closed
April 4, 2023, 9:49am
11
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.