Learn HTML, Cat photo app, step 55

Here is the code I wrote:

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

It showes the desired result yet it doesn’t pass, If anyone could direct me toward what’s wrong

I have edited your post to include the challenge link.
Please include this link when asking for help on the forum so we know how to assist you.

I’ve edited your post for readability. 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 (’).

HI @Hajar !

Welcome to the forum!

Please read the hints for the challenge more carefully.

It wants you to move the label to the right of the input.
Right now you have the label above the input

Still doesn’t work for me.

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

The last sentence of the hint says to make sure there is a space between the elements.

Once you fix that, then it passes.

Which two elements?
Betwen the input and the label elements? Because I already tried that and it doesn’t work.

There needs to be a space here

Can you post your latest code with the space so we can test it on our ends?

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

The code you have shared works on my end. Please ensure that you have disabled any extensions that interface with the freeCodeCamp website (such as Dark Mode and Ad Blocker), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

Or try another browser

Okey thanks for your answers

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