Needing help with Step 55

There’s another way to associate an input element’s text with the element itself. You can nest the text within a label element and add a for attribute with the same value as the input element’s id attribute.

Associate the text Loving with the checkbox by only nesting the text Loving in a label element and place it to the right side of the checkbox input element.

Been stuck on this for the last two days. I get that it’s wanting me to make a (for attribute) text and nest it in a label element. But how to formulate it is the major part I’ve been struggling on.

That’s unfortunate, but we need to see your code to help you

1 Like

input id=“Loving” type=“checkbox”>loving
label for=“Loving”>loving

To make code look like code you need to wrap up it in triple backticks.

1 Like

This whole thing above is kinda wrong one.
Lets restart the step I suggest
We will see this line:

<input id="loving" type="checkbox"> Loving

We have this little objective:

only nesting the text Loving in a label element.

Do you need example of nesting text in the element?

quick update: also let’s not be confused about case sensitivity:

loving //it will be attribute
Loving // it will be actual text content

Yeah, that would have to mean that there would a opening and closing element surrounding the text “loving”

Yep. But again: in our case text is Loving.

We are coding, every letter, every little annoying comma is important

but what does the commas have to do with the “for attribute”?

that was general example. I should say every little syntax detail is important.

So you have

within input element.

To connect it with label
You need
to give label element attribute for with the value loving

label> for=“loving”</label

like this?

like this:

<element attribute="value">text</element>

So I wrote it like this, but I’m still getting an error in my code.

label for=“value”>Loving</label

Well I believe you grasped the idea, but I can’t see all your code.
Also I can’t figure out why your code here doesn’t begin with < and doesn’t end with >.

EDIT. and why you have value here? That’s not OK.

Everytime I put the ending <> It keeps making the code disappear for some reason. So I take it out just to only show what I got so far.

And whoops, when you showed me a way to formulate. I must’ve thought you actually meant to put the literal term value. Here’s the new one now.

label for=“loving”>Loving</label

OK. Try to answer this post. But before typing anything, press ctrl+e. That will show you how to do stuff like:

code examples
<input id="Loving" type="checkbox">loving
<label for="loving">Loving</label>

Oh yes, now I see. Thanks for that.
As you can see, the code now above. I’ve changed the value to “loving” as well. But now I face the same problem. I’m not entirely sure what this means because I already have an id attribute above.

-Your checkbox should still have an id attribute with the value loving . You may have removed the attribute or changed its value.

You have 2 texts here. loving and Loving. Does it make sense? You needed

wrap up text Loving in label >>> DONE
figure out what’s up with for attribute >>> DONE

There was no reason to add more copies of ‘loving text’)))

I’m sorry, I didn’t understand what you said at all. Any chance you could simplify?

Sure
You have these 2 lines

Job is almost done here.

we need to get rid of the text loving, which is between input and label.

You only need text inside label element, and you already have it, it is Loving

do this if you are stuck
Loving
Loving