Do we need h2 .. h6?

Obviously the authors of the HTML5 spec don’t have the courage to clean up the language. Backwards compatibility seems to be the goal. Consequently the interaction of headings and sections is a mess.


I don’t think we need more than one heading together with the new section element. The HTML5 spec talks about “implied sections”. I prefer explicit sections. Here’s my suggestion:

<!ENTITY % H5SectioningContent "(h1 | hgroup),
                                  ((%block;)+, section*)
<!ELEMENT section      (%H5SectioningContent;) >

Since I want the DTD to be a subset of HTML5, I can’t introduce new element types. Therefore, h1 will be the only one of the “old” heading types as a direct child of section. If you want to have something like a title and a subtitle, use the new hgroup element as the only container for h1 and h2:

<!ELEMENT hgroup       ( h1, h2) >

As a first approximation, the body looks like a section:

<!ELEMENT body      (%H5SectioningContent;) >

This entry was posted on 31/05/2011 in critique, proposal, question and tagged , , . Bookmark the permalink. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.

Creative Commons License
HTML5 DTD by Stefan Mintert/Linkwerk GmbH is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.