(hi, i need help) Learn HTML by Building a Cat Photo App - Step 56

Tell us what’s happening:
i’m stuck on this step, and i need some help please. (also quick question, does freecodecamp save my progress? like can i exit the website?)
My code so far

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

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 15054.98.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Learn HTML by Building a Cat Photo App - Step 56

Link to the challenge:

Yes, freecodecamp will automatically save your progress when you sign up with your email.

For your code, you don’t need to create new label for the word Loving. Nest it inside the existing label with the class for.

(post deleted by author)

hello and welcome to fcc forum :slight_smile:

this snippet has few syntax and semantics problem:

  • “input” element is missing “closing” bracket for its “opening” tag
  • there is two “label” for same “input” element

also be mindful about what “hartatociptajaya” has already mentioned about this step to pass

and finally lets read instructions more closely,

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.

i would recommend you “restart” this step and simply “nest” input element with “label” along with that “label text” as it says in instructions

happy learning :slight_smile:

hi, thank you for your help! i accidentally deleted my response to you. oopsie

hi, thank you for ur response! i thought input was “self-closing” maybe i’m mistaken. I added a closing bracket.
this is my current code :

<label<input type="checkbox"id="loving"for=“loving”>Loving ></lab el>


my hint actually says : " The text Loving should no longer be located directly to the right of your checkbox. It should be wrapped in a label element. Make sure there is a space between the two elements."

I feel like the hint and directions are contradicting… And i feel like i’ve already done that. so im not sure what mistake i’m making.

this code makes sense to me:
<input type="checkbox"id="loving"for=“loving”> Loving </l abel>

but it keeps telling me:

You will need to add a new label element in which to nest the text Loving . Make sure it has both an opening and closing tag. (also it makes my closing label tag in this reply invisible unless i add a random space, so thats why its like that) the opening label tag is right infront of the word Loving. it wont show it.

your code is unfortunately still wrong.
You must pay attention to the details of correct syntax. for eg.

This here is not a correct closing tag.
</label> but this one is

Please follow the steps carefully.

1- put a label element on the -right- of the input element
2- the label element should contain the word Loving (no extra spaces)
3- the label opening tag should have the for attribute within it
4- there should be exactly one space between the input and the opening tag for label

hello, thank you for your response.

okay, i tried my best to follow your instructions. does this look right to you?

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


(if i don’t add the space in the closing label tag this forum doesn’t show it. but i will omit it in my real code) also am i missing a closing bracket for the input element?

No sorry.

My first instruction was:
1- put a label element on the -right- of the input element.

Here is an example:

<input type="radio"> 

If I want to add a label to the right, then:

<input type="radio"> <label></label>

I’m making this example simple because I want you to see the placement of what I mean by to the right of the input element.

In the real code, your label has to enclose the word Loving within it

Please reset and try again.

oh okay i see. thank you
i think i fixed it?

<input type="checkbox"id=“loving”> (label opening tag here)for="loving"Loving</la bel>

also why won’t it show my label tags? : , (

please read this post carefully and try to repost the code

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

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

oooh yay! thank you

okay well, thats my code.

okay fantastic.
You are getting closer.
You just need to follow this step a bit closer:

Right now the for attribute is not inside the opening tag of the label

1 Like

hmmm. like this?

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

yes correct. I have blurred it because it is now showing the solution.
You should be able to pass with this code.
If you are not able to, then try to reset the code then do a hard refresh of the browser CTRL-F5.
Then paste this new line in.

it worked! thank you so much for your help : )

1 Like

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