Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAmy Clark
7,892 PointsWhy the H3 when there's no H2?
Not sure why there's an H3 after an H1 in this example which I always understood to be bad for accessibility and SEO.
Jason Anello
Courses Plus Student 94,610 PointsHi Amy,
Which lesson are you on right now? Your question is only tagged with the HTML category.
1 Answer
Amy Clark
7,892 PointsBut we shouldn't use heading styles for formatting how things look. The markup for HTML is hierarchical so to make headings smaller or to display things a certain way, this should only be done in the CSS. So, in this case, an H2 should have been used and the formatting adjusted to make it the relevant size in the CSS. I just thought it was odd to use an H3 when the course is about good markup for accessibility.
Clayton Batchelor
5,817 PointsYou want to style your page as much as you can considering html stands for mark up language. He could be using the h3 because its a smaller heading to go off of. once you get into rems you style the heading depending on the pixel size of the tag. Coding is not about following the rules. Coding is more of finding ways to break rules. Sure there's many different ways to style and code to get the same result. But if you use an h2 tag when your supposed to be using an h3. It leads to more converting. More coding. Less code equals better code. Look up the topic on how to use rems. they adjust the sizing according to the original pixel size of the heading tags.
Clayton Batchelor
5,817 PointsClayton Batchelor
5,817 PointsH1 and h2 and h3 are all different heading size. If they used h3 instead of a h2 then that means they wanted a smaller heading.