Alex,
Even if you are using sections, I wouldn't style headings based on how
many sections deep they happen to be. On most sites, this will end up
being arbitrary as different visual components may be found in
different parts of the site. In addition, those styles won't be
portable, so you'll end up repeating yourself.
Look at how many different heading styles you have (font-sizes give
the best clue) -- and then try not to duplicate them. This means that
when you have a style that will make your text 16px, you never (ok,
rarely) want to duplicate that style. (this follows the DRY principle)
Let's look at an example:
h1 {font-size: 36px}
section h1 {font-size: 24px}
section section h1 {font-size: 22px}
section section section h1 {font-size: 18px}
section section section section section h1 {font-size: 16px}
section section section section section section h1 {font-size: 15px}
section section section section section section section h1 {font-size:
14px}
section section section section section section section section h1
{font-size: 13px}
section section section section section section section section
section h1 {font-size: 12px}
section section section section section section section section
section section h1 {font-size: 11px}
What happens when you want a 14px heading, but it's in a part of the
site that is only nested two sections deep? Are you going to add
unnecessary section tags to get it to look right? Will you create a
duplicate selector?
What if, semantically speaking, you need to add an additional section
to a bit of html? That will unintentionally change the way your
headings look.
I recommend abstracting site wide headings into classes because then
they are portable, predictable, and dry. You can call them anything
you like. Jeremy Keith recommends something like:
.Alpha
.Beta {}
.Gamma{}
.Delta{}
.Epsilon{}
.Zeta{}
or
.tera {}
.giga {}
.mega{}
.kilo{}
.hecto{}
.deca{}
.deci {}
.centi{}
.milli{}
.micro{}
.nano{}
.pico{}
I keep it simple with:
.h1{}
.h2{}
.h3{}
.h4{}
.h5{}
.h6{}
It doesn't really matter what system you choose as long as it is
something easy for your team to remember.
Then, no matter how many section levels deep your heading is nested,
you can make it look just how you want:
<section>
<section>
<section>
<h1 class="kilo">My heading </h1>
</section>
</section>
</section>
And you can move that piece of code around, and it will still look the
way it was designed to.
Whether you are using html5 for sections or not, you don't want to
repeat code or have it be really unpredictable, so I think the rule is
still right, even if you are using sectioning elements.
If you don't mind duplication or unpredictability (say maybe for a
brochureware site that won't change much), then you can easily turn
that rule off.
Does that help?
Nicole