So <HGROUP> Is Back In HTML 5, And Dumb As Ever!

Jason Knight
CodeX
Published in
5 min readDec 3, 2022

--

Well over a decade ago when the WhatWG was first working on HTML 5 they introduced the <hgroup> tag to group together numbered headings for things like title and tagline. This immediately raised the ire of people who understood HTML semantics since putting H1+H2 together that way is ignorant broken nonsense. Many — myself included — took it as proof alongside acceptance of <embed> into the spec, their new <aside> tag that had nothing to do with grammatical/literary asides and instead indicated presentation, the pointless <video> and <audio> that were redundant to <object> — that the people creating HTML 5 didn’t know enough about HTML 4 to be making its successor.

Because this:

<hgroup>
<h1>Site Title</h1>
<h2>TagLine</h2>
</hgroup>

Is ignorant incompetent dumbass rubbish if you understand that a H1 is the (singular) headING (singular) that all H2 on the page mark the start of subsections of. The first H2 on a page marking the start of the main content if you don’t use <main>. H3 mark the start of a subsection of the H2 preceding it and so forth. They do not mean fonts in different weights and sizes, they establish a navigable document structure with landings. A concept very important for users of screen readers and braille readers, as well as for search engines.

--

--

Jason Knight
CodeX

Accessibility and Efficiency Consultant, Web Developer, Musician, and just general pain in the arse