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
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
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
(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?
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.
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.