Learn HTML by Building a Cat Photo App - Step 56

this code hasnt worked for two days and keeps cutting post off saying for security i cannot post for 20 some hours, below is code that wont let me pass
<input id="loving" type="checkbox"> Loving
<label for="loving"> Loving </label>

You wrote ‘Loving’ twice. That text must be there exactly once.

its needs to be written twice if i take it out of the for attribute then Im not doing what assingment says. I tried what you said but it dont work, it said I need a space between labels.
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 nesting only the text Loving in a label element and giving it an appropriate for attribute.
<input id="loving" type="checkbox"> Loving
<label for="loving"></label>
here it is without writing Loving twice, doesnt work or make sense if I take other loving out either

You took out the wrong one.

It makes no sense to not have anything inside of the label. You must have the word ‘Loving’ inside of the label, with zero extra spaces. There must be one space between the input and the label.

The challenge wants you to only add the opening and closing label tags, zero extra text or words.

it doesnt work that way either I tried it,more than once, if i take out the next one there is no for attribute then
<input id="loving" type="checkbox"> Loving
<label> loving </label>
now i took them both out and ran it each time, neither worked are you telling me to take it out of the input, running it like you are suggesting like i did above goes against challeng because there is no for then

Re-read this, and then look at your label.

You now have ‘loving’ written twice and you have the wrong label tags. You aren’t doing what I suggested.

  1. reset the code

  2. put this immediately before the ‘L’ of ‘Loving’

  1. put this immediately after the ‘g’ of ‘Loving’

Add zero extra spaces. Add zero extra words

1 Like

The new label element should have a for attribute with the value loving . Expected loving , but found loving .
here is what is says now… The new label element should have a for attribute with the value loving . Expected loving , but found loving …so it is looking for loving and found what it is looking for and its still a problem!!! Im not new to HTMl just trying to refresh been doing python the last 18 months. It s been a problem now with this code for going on 4 days for one step. This is probable the last post it will let me do for the next 24 hours maybe one more Im not sure, its the site not my code ridiculous. I got better things and better sites to practice on then this one its shame i heard good things, amost donated to it the first night glad I didn;t and I refuse to reset and go back 56 steps. thanks for trying to help

Please show me where you have done this. This is as close as I can get to writing the answer for you.

If you do exactly this, then your code will pass. If you do anything else, your code will fail. The test wants exactly and only this one thing it’s asking for. The tests are picky like that.

Its worth saying that he doesnt mean reset and start at step 1. Hes saying click the reset button on the challenge, and it will reset all the code back to the default so you can have a fresh start with this challenge

1 Like

Ah, yes. ‘reset the code’ and ‘reset the entire project and go to a different step’ are completely different things. There is a ‘Reset the Code’ button right next to the error messages.

I get that you are frustrated. Learning is hard. We are trying to tell you what you need to do to fix the code. You are doing different things than what we are saying needs to be fixed, which is why it’s not working.

Code is very specific. You have to do the exact thing being asked, or the tests can’t recognize your answer.

I guess I’m lost, been coding for a few years just wanted the HTML cert to add to resume, dont really need it never hurts to go back to the beginning especially in this field. The code work in VS and in pycharm, guess Im not following direction. Again thanks for the help my friend. have a good day

Did you try the three steps we gave you? Can you show us what the code looks like if you follow the steps we gave you?

Your code works in VSCode because the tests aren’t there, lol. The tests want you to do exactly and only the changes given by the three steps I wrote out.

These three steps here.

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