Comments on: The hgroup hokey cokey https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/ helping you implement HTML5 today Wed, 04 May 2016 10:02:12 +0000 hourly 1 By: Jonathan https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-29474 Thu, 20 Dec 2012 23:54:59 +0000 http://html5doctor.com/?p=3208#comment-29474 Either allow <hgroup> to support elements beside <hX>, or introduce a similar element that will, like <subline>.

]]>
By: Shauna https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-17139 Fri, 12 Aug 2011 13:05:04 +0000 http://html5doctor.com/?p=3208#comment-17139 @Diego – You only go two deep. How would add a third or fourth level to that? And how would you style it? (I have my own ideas, but as you’re the one that wants to get rid of <h#>, I’m interested in your solution.)

<h#> only really imposes order outside of structure because that’s how current browsers render it. Just like the meaning of <b> has changed with HTML5, so can <h#> be changed to provide a meaning more in line with today’s ideals.

]]>
By: Adam https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-17136 Fri, 12 Aug 2011 11:35:05 +0000 http://html5doctor.com/?p=3208#comment-17136 We should, and maybe in the future we will enjoy such a simplicity (or maybe some more far-sighted civilizations in the outer space already enjoy now :-), but this is actually out of the topic about <hgroup>. Backwards compatibility must be considered here, so the presence of <h#> is still here to make the transition easier.

Nesting a subtitle inside a heading element still expose the subtitle to the outlining algorithm, which I admit may be desired in some cases, so the solution should be as most universal as possible.

]]>
By: DiegoV https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-17129 Fri, 12 Aug 2011 02:54:14 +0000 http://html5doctor.com/?p=3208#comment-17129 The problem is that <h#> imposes an order outside of it’s relationship within the document. In outlines, it’s not the alpha-numerals that give the hierarchical structure, as indention alone would suffice. It’s the same for markup, contextual inference should be enough. Consider this as a possibility:

<html>
<title>…</title>
<body>
<title>…</title>
<article>
<title>…</title>
<section>
<title>…</title>
</section>
</article>
</body>
</html>

Numeration is unnecessary. And if I understand the <hgroup> argument correctly, the need is to associate subheads with headlines without the numbers messing up the hierarchy. The numbers, therefore the tag, should be deprecated.

But as far as subheads are concerned, there have been plenty of viable solutions mentioned earlier it the thread. Even nesting appeals:

<title>…<title>…</title></title>

We should strive for simplicity and fewer tags.

]]>
By: Shauna https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-17121 Thu, 11 Aug 2011 13:40:53 +0000 http://html5doctor.com/?p=3208#comment-17121 @Diego V – The <h#> comes from document structure (go figure). If you recall back to your college or high school days, when you had to write according to MLA or APA standards, you had heading hierarchies. First order headings have to be in all caps and centered, second order headings are left-aligned and title capped, third order are on the same line as the paragraph, etc. That’s actually what the <h#> tags are supposed to be for, not using an <h2> as a subtitle for <h1>.

Without the <h#> tags, how do you propose we determine if a heading (subsection) is part of a higher-order heading (chapter; particularly programmatically speaking, since the markup itself is really largely there for the computers, styling it with CSS is for the humans), if not with the <h#> tags?

Now, I agree, I would love to see the misuse of <h#> be replaced by something better suited to including a subheading in markup. Maybe <hgroup> will be that alternative, and maybe <h#> will end up more like <table> – not used nearly as much as it used to be, but also not abused like it used to be; but to wish it into obsoleteness misses the real intention and purpose of the tag, I think.

]]>
By: Adam https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-17119 Thu, 11 Aug 2011 13:10:02 +0000 http://html5doctor.com/?p=3208#comment-17119 @DiegoV: I agree, that was an alternative I have also considered – to structure the document using the sectioning content so the sections are made explicit and the scope of <subtitle>, when placed within them, would be clear. But I have picked the modified <hgroup> solution as it converges better with the current state. However, <subtitle>, in contrast, could be placed everywhere inside the section (the question is if that is necessary and logical), also an element which purpose follows its name is far more pleasant.

]]>
By: DiegoV https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-17108 Thu, 11 Aug 2011 05:39:29 +0000 http://html5doctor.com/?p=3208#comment-17108 I was hoping the hierarchy of headlines would be more implicit in HTML5, especially since the new structural elements are so awesomely recursive. To me, it would be far better if we could lose the concept of numbering <h> tags and allow structure to determine hierarchy. With that purpose in mind, I’m in favor of adopting the more semantic <title> and <subtitle> tags… and let <h#> fade into obsolescence.

]]>
By: Adam https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-17106 Thu, 11 Aug 2011 03:24:32 +0000 http://html5doctor.com/?p=3208#comment-17106 Oh, I thought <code> doesn’t need &lt; and &gt;..


<header>
<hgroup>
<p>let me introduce...</p>
<h2>The new sophisticated heading of this imaginary article</h2>
<p>..I know, not so special indeed</p>
</hgroup>
<p>Posted by: ...</p>
<p>Created: ...</p>
</header>

]]>
By: Adam https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-17105 Thu, 11 Aug 2011 03:18:40 +0000 http://html5doctor.com/?p=3208#comment-17105 @David: So you use <hgroup> just because you have some heading followed by a subtitle and now a “new” semantic element appeared that seems to nicely wrap those, and moreover, you don’t have to use an additional ugly class in the markup to target it? (In fact you generally have to, unless you use CSS3 or something like: section>h2 to exclude non-subtitle headings). I think this is how many will think about it, but the reason why the element was added – to hide subordinate titles from the outline – will be easily overlooked.
HTML designers are always so happy to welcome any new reasonable semantic element so the markup looks more attractive than a bunch of <div>s and <span>s and now when they have one such, even half-baked, they are not willing to surrender it. Lars Gunther’s arguments speak for themselves and as long as HTML5 is still a draft, it seems perfectly fine to me to take the path of the most appropriate and comprehensible solution as possible, in particular, after the experience with XHTML and it’s acceptance.
Let me contribute with some suggestion on this issue. As the least problematic I found a modified version of <hgroup> which allows more elements to be used as its content, at least restricted to the non-sectioning content. Actually, I don’t understand why <hgroup> is currently restricted to the heading content only, forcing the authors not to put e.g. <p> inside. But real cases show that it could be useful to be able to decide whether heading, paragraph or small list (as in the last example posted by Marcus Downing) should be marked as a subtitle(s) and at the same time preserving the control over what will be shown in the outline. Just wrapping the “subtitle content” in the same manner as wrapping the footer content in the <footer>. Backwards compatibility and performance will not be affected. Compared to the actual spec of <hgroup>, there is a little disadvantage (as far as I’m aware) in my suggestion that is the a rank can’t be assigned to multi-level subtitles, but I think there is no need for such a luxury as the subtitles are very short, are read as a whole and thus no navigation between them is necessary. On the other hand there is an advantage of a possibility to put the “subtitle content” everywhere around the heading they are related to, so there is more room for creativity.

let me introduce...
The new sophisticated heading of this imaginary article
..I know, not so special indeed

Posted by: ...
Created: ...

]]>
By: David https://stevefaulkner.github.io/html5doctored/the-hgroup-hokey-cokey/#comment-15071 Sat, 28 May 2011 15:41:48 +0000 http://html5doctor.com/?p=3208#comment-15071 If hgroup is out, I’ll find myself using <div class="hgroup">, guaranteed.

]]>