W3C home > Mailing lists > Public > public-html@w3.org > January 2011

Re: hgroup: a possible alternative

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Tue, 11 Jan 2011 04:28:43 +0100
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: James Graham <jgraham@opera.com>, Toby Inkster <tai@g5n.co.uk>, HTML WG LIST <public-html@w3.org>
Message-ID: <20110111042843765250.6ee6d2c5@xn--mlform-iua.no>
Tab Atkins Jr., Mon, 10 Jan 2011 17:59:13 -0800:
> On Mon, Jan 10, 2011 at 5:32 PM, Leif Halvard Silli wrote:
>> James Graham, Mon, 10 Jan 2011 23:46:52 +0100 (CET):
>>> On Mon, 10 Jan 2011, Toby Inkster wrote:
>>  ...
>>> Why not <h1>Main Heading <subhead>Subheading</subhead></h1>
>>  ....
>>> <subhead> also has the benefit of simplifying the outline
>>> algorithm somewhat compared to <hgroup>.
>> 
>> Why not. Because the outline algorithm - as well as the authoring -
>> would become simplified if instead of marking up the text *not* to go
>> into the outline, one could mark up the text to *go* into the outline.
   [ snip ]
>>        <h1> The <subhead> happy, </subhead>
>>             sad <subhead> book </subhead> lover </h1>
> 
> What's wrong with that?  If the author wants to be confusing and
> weird, they can be confusing and weird.  I don't see any particular
> reason to disallow that, when it's so obviously a really confusing and
> weird thing to do.

Nevertheless, w.r.t. <hgroup>, then the algorithm is currently designed 
to avoid such opportunities.

>> Kornel has suggested, structurally, the following:
>> 
>>        <h1><outline>Main heading</outlin> Subtitle</h1>
>> 
>> which I think is more flexible than <subhead>. Given that it it would
>> be forbidden (I presume) with more than one <outline> element per
>> heading element, it would also be simple to select in CSS, even with
>> "dumb" selectros like h1 outline{}.
> 
> This has weird effects. Styling a normal heading requires just an
> "hn" selector, while with this you have to use "hn" to first style the
> subheading how you want, and then reverse anything you want different
> on the heading with a separate "hn > outline" rule.

I would expect authors to add <span>, <b>, <i> and the like around 
those other parts, *in case* they want another styling for those parts. 
Such elements would also not modify the heading semanitcs of the parts 
theys were added to.

> Using <subhead> gives a more reasonable behavior, where you always
> style the heading with "hn", and then use an "hn > subhead" selector
> just to change the bits you want about the subheading.

Yes. <outline> would be perfect if all one wants is control of the 
outline. Buf if one also expects to see effects on the look of the 
content of the heading element (and the <subhead> name invites to such 
expectations), then <subhead> would be simpler to use.

So far I must say I am more satisfied with the way <hgroup> works. 
-- 
leif halvard silli
Received on Tuesday, 11 January 2011 03:29:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:18 GMT