Why is my h6 not registering my font-size of 14 when all the others (h1-h5) are working with the same code structure? I keep getting an error message telling me I dont have my h6 set to 14 pixels(!?)
Your code so far
<h1 style="font-size: 68px">This is h1 text</h1>
<h2 style="font-size: 52px">This is h2 text</h2>
<h3 style="font-size: 40px">This is h3 text</h3>
<h4 style="font-size: 32px">This is h4 text</h4>
<h5 style="font-size: 21px">This is h5 text</h5>
<h6 style="font-size: 14px">This is h6 text</h6>
</style>
<h1 style="font-size: 68px">This is h1 text</h1>
<h2 style="font-size: 52px">This is h2 text</h2>
<h3 style="font-size: 40px">This is h3 text</h3>
<h4 style="font-size: 32px">This is h4 text</h4>
<h5 style="font-size: 21px">This is h5 text</h5>
<h6 style="font-size: 14px">This is h6 text</h6>
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Challenge: Set the font-size for Multiple Heading Elements
well its weird. The h1, h2, h3, h4 and h5 syntaxes are working(?). Im coding the “font-size” right inside the <h> html codes and havent used any brackets on any of them. Arent the brackets required for the CSS that resides between <style> and </style>?
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.
It is important to make sure anything inside the style tags is written in the correct css format.
Edit: I just realized you altered the html code when you are not supposed to.
That is why you are see the results in your window.
But the instructions don’t ask for inline styles at all.
You were only supposed to add code to the style tags and nothing else.
wow!.. jwilkins… so it has to be coded in both the css and the html elements(?). Why wouldnt someone just code it in the html. Does it have to be fully defined in the elements every time? if so, what is the advantage of the css? thank you again for all your insight!
jwilkins, thank you again for your help. I found the resolve. It wasn’t different than my original attempt, but in my original attempt the css code I input was being recognized for all the <h> elements except for <h6>. Thats why i started tweaking and messing around with other css structures and eventually dove into the inline syntax. Anyway, I got it to go through. freeCodeCamp is an AWESOME tutorial tool. As soon as I get money coming in I will DEFINITELY donate. Right now I’m unemployed and looking to “enhance my market value” as a graphic designer.
Just a bit of advice for the rest of your course. Just about all the questions will ask you to use internal CSS between the style tags rather than inline within the html so I would advise trying to get used to it as soon as you can