The Tags, They are A-Changin’

The new HTML5 <hgroup> tag has been discontinued by the W3C, the web’s governing organization — somewhat behind the scenes.  Admittedly, it was on shaky ground with this whole not-fully-baked HTML5 spec we all now know and love. But the tag kind of made sense and we, like most of the web design community, started using it.

What is the <hgroup> tag? Essentially, if a web page included two or more headline-style lines of text at the top, then the coder would nest them between an opening and closing <hgroup> tag set. Then, the coder could position all of those headlines as one piece, instead of attempting to position them individually. In the past we may have done this with the general <div> tag with some semi-meaningful attribute, but with the focus of HTML5 moving more towards semantic/descriptive tags, the <hgroup> was embraced by a lot of us.

Changing specs makes teaching web design interesting–even more interesting than the usual technology and syntax changes that come along with teaching in this area. In an online Web Design course I’m teaching now, I recently had a student insist on using the <hgroup> tag since my screencasts, text materials and lynda.com video tutorial examples still included it as a valid tag. After I provided a few links for proof, he finally acquiesced and dropped his campaign.

It’s not just teaching that gets a bit fuzzy with this rapidly moving publishing technology of website design. What about site validation for all the WordPress and other sites we’ve already published and handed over to clients? Site validation is what we do to make sure we’re providing good, solid code that the web browsers will like and display correctly. The discontinuance of the tag won’t affect how these sites appear and function going forward, and no typical user will really notice such an arcane little change in the specification or rendering of the web page, but the holistic coding practice we like to embrace is affected a bit. The site will no longer officially validate with the W3C if the validator service sees an <hgroup> tag right now. Again, most people won’t notice — but some of our clients will worry that the code won’t validate, and will have trouble understanding our explanations.

The <hgroup> tag could come back in a further revision of HTML5, but who knows? Either way, we won’t be adding it on new sites, and any of our sites that we manage, we’ll probably go back in and remove them if we see any trouble on the horizon. But we don’t see any trouble that necessitates changes on any published sites, and that’s good.


Posted

in

,

by

Tags:

Comments

5 responses to “The Tags, They are A-Changin’”

  1. Phil Avatar

    Man, I really liked that tag and have used it often.

    1. Tom Hapgood Avatar

      Phil, I guess they say it wasn’t semantic enough in describing its purpose any better than a div, but perhaps they’ll bring it or something better back in.

  2. steve faulkner Avatar
    steve faulkner

    There is advice in the spec on how to markup up the various semantic concepts such as subtitles, alternative titles and taglines: http://www.w3.org/html/wg/drafts/html/master/common-idioms.html#sub-head there is also a recent article which discusses the change: http://html5doctor.com/howto-subheadings/

    1. Tom Hapgood Avatar

      Great, Steve, thanks! I have nested a span inside of an h tag before, but it’s good to know that that is a suggested method. I wouldn’t have thought of the p tag in a sub-heading sense, but if it’s nested in a header tag, then that also makes sense. Thanks for the great response and references.

  3. Rebecca Haden Avatar
    Rebecca Haden

    Hey, Tom, you look a lot like me right now!

Leave a Reply