BUG Report

Set the font-size for Multiple Heading Elements
(https://www.freecodecamp.org/learn/responsive-web-design/applied-visual-design/set-the-font-size-for-multiple-heading-elements)
Set the font-weight for Multiple Heading Elements
(https://www.freecodecamp.org/learn/responsive-web-design/applied-visual-design/set-the-font-weight-for-multiple-heading-elements)

Can’t pass these Anyone with the same problem?
h1 {
font-size: 68px;
font-weight: 800;
}
h2 {
font-size: 52px;
font6weight: 800;
}
h3 {
font-size: 40px;
font-weight: 500;
}
h4 {
font-size: 32px;
font-weight: 400;
}
h5 {
font-size: 21px;
font-weight: 200;
}
h6 {
font-size: 14px;
font-weight: 200;
}

Is that what you’re trying to submit? If so, I may have noticed a few typos.

Your - is a 6 instead, not sure if that was just a typo here or on FreeCodeCamp. Also, the font-weight for h2 is the same as h1 so try looking at what they want you to set h2 as.
Here is the answer.

h2 {
font-size: 52px;
font-weight: 600;

Your h5 and h6 have the same weight. Recheck what FreeCodeCamp wants the values to be here as well.
Answer

h5 {
font-size: 21px
font-weight: 300;
Your h6 is correct

1 Like

Hi Michael!

Starii’s already answered your question. I just wanted to share how to format your code when sharing it online; as your code becomes lengthy, and more complex, you’ll want to make it as easy as possible for people to help you.

To format inline code, simply wrap the code in two backticks: ``
the results looks like this

For multiple lines, you can indent your code with 4 spaces, or (my preferred method) wrap it all in three backticks: ``````

// The result looks like this
<h1 class="main-header">Formatted!</h1>

This syntax works in many places such as Slack, Discord, Reddit and loads of other forums.

I hope this helps you moving forward!

7 Likes

Thanks, Starii, fixed as you advised and passed but still can’t pass the

1 Like
 h1 {
    font-size: 68px;
  }
  h2 {
    font-size: 52px;
  }
  h3 {
    font-size: 40px;
  }
  h4 {
    font-size: 32px;
  }
  h5 {
    font-size: 21px;
  }
  h6 {
    font-size: 14px;
  }
1 Like

No worries to anyone who can’t seem to pass even if you did actually write the correct code.
SOLUTION

1 Like

can you please explain how you indented the code a little more if possible? Or if you can link to an article that explains how to do it.

Hi Ki,

I found this markdown tutorial helpful.


Also, if you like to know more about the Discourse forum, you can go to:

Profile > Messages tab > @discobot Greetings! > Reply @discobot start tutorial (or) @discobot start advanced tutorial

The markdown link is from the discobot message thread.

3 Likes

Let me know if the cheat-sheet @sherry shared helped

2 Likes

Thanks sm! It is v helpful :smiley: That was very kind of you

1 Like

Yes, it cleared my doubts up <( ̄︶ ̄)>

2 Likes

Please help! I cannot get the test for set-the-font-size-for-multiple-heading-elements to pass. I’ve gone over the code several times and it is correct. I don’t have any ad blockers and I’m using chrome. On top of that when I try to go to the free code camp forum, from an already signed in page, it asks for me to log in but then it says I don’t exist. Can anybody tell me how to get past this?

Can you post your code here?

<style>
h1 {
  font-size: 68px;
}
h2 {
  font-size: 52px;
}
h3 {
  font-size: 40px;
}
h4 {
  font-size: 32px;
}
h5 {
  font-size: 21px;
}
h6 {
  font-size: 14px;
}

</style>
<h1>This is h1 text</h1>
<h2>This is h2 text</h2>
<h3>This is h3 text</h3>
<h4>This is h4 text</h4>
<h5>This is h5 text</h5>
<h6>This is h6 text</h6>

screenshots at

I just copied your text into the example and it passes all the tests. It even works when I am not logged in. I tried in both Chrome and Firefox.

As you can see in the screen shots though it kept failing me. I wrote free code camp and they sent me what I believe to be a form letter suggesting I use one of their supported browsers but of course I am. I have even attempted to do the challenge in Firefox but still same result, X’es on everything. Wrote them back and not sure what else I can do.

That’s strange, the code is fine. Use an Incognito window in Chrome and see if that works. It could be an extension causing problems also.