Please help! Step 42 Learn Typography by building a Nutrition Label

Please help, not sure if this a problem caused by the outage or if there is something wrong with my code. I thought that I responded correctly, but I keep getting an error in my code msg, here is the challenge:

After your last .divider element, create a p element and give it the text Total Fat 8g 10%. Wrap Total Fat in a span element with the class set to bold. Wrap 10% in another span element with the class set to bold right.

below is my code:

1 Like

Please post your actual code instead of a picture and a link to the challenge. Thanks

when i try to paste the code it applies the html

see below:
<p><span class="bold">Total Fat</span> 8g<span class="bold-right"">10%</span></p>

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 (’).

thanks…

any suggestions on how to solve the error?

I’m trying to read the challenge instructions from the picture, but it’s hard to see.

Ah, you copied the challenge text but not the link to the challenge. I see.

That looks like a typo. You have too many quotation marks.

corrected, but still getting the same error

challenge:
After your last .divider element, create a p element and give it the text Total Fat 8g 10% . Wrap Total Fat in a span element with the class set to bold . Wrap 10% in another span element with the class set to bold right .

my code:

p><span class="bold">Total Fat</span>8g <span class="bold right">10%</span></p>

link to the actual challenge:

How does the spacing look when this renders? Moving that space may be a problem.

There needs to be a space between 8g and 10%

this is the text without the spans added as per the directions of the challenge:

“Total Fat 8g 10%”

BTW, I did try removing the space and I still received the same error msg

It looks like there is no space between Fat and 8g. You used to have one there.

this is the quote from the directions. I actually copy pasted the text which clearly show a space between “Fat” and “8g”

“After your last .divider element, create a p element and give it the text Total Fat 8g 10% . Wrap Total Fat in a span element with the class set to bold . Wrap 10% in another span element with the class set to bold right .”

the error is as follows:

Test

Sorry, your code does not pass. Keep trying.

Hint

Your new p element should have the text Total Fat 8g 10%

The hint clearly shows a space between “Fat” and “8g”

  1. 'p> → not sure whether this came while you were pasting the code.
  2. There should be a space before 8g.
2 Likes

wow…that actually work…Thanks bro…

the 'p was only an error in the discussion…but the space before the 8g was what fixed it…you have a good eye.

Oh wow… Like I said?

LOL, I was telling you that you had no space there

Somehow it made sense when you said put a space before the 8g…thanks for your patience and communication…

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