Menu

#32 Use XHTML2 or HTML5 to fix heading levels

open
nobody
None
5
2006-07-24
2006-07-24
No

XHTML2 allows you to have headers like so:

<section>
<h></h>
<section>
<h></h>
</section>
</section>

So headings depend on the nesting level of the
sections. The advantage of this is that if you want to
use headers in a post, you don’t really know what the
current heading level is (<h1>, <h2>, <h3>?), so which
do you pick? If we’d internally store <h> and <section>
tags instead of something arbitrary like <h4>, it would
be better.

‘HTML5’ uses h1 instead of h, which I personally think
is ugly (so I don’t like it :)), and I also think you
always need a wrapping <section> element, but it could
also be an option.

~Grauw

Discussion


Log in to post a comment.

MongoDB Logo MongoDB