[whatwg] <di>? Please?

Ian Hickson ian at hixie.ch
Sun Mar 4 21:09:10 PST 2012


On Sun, 4 Mar 2012, Hugh Guiney wrote:
> On Sun, Mar 4, 2012 at 5:07 PM, Ian Hickson <ian at hixie.ch> wrote:
> >> Then why is <section> in the spec?
> >
> > To make it easier to move subsections around without having to change 
> > all the <h5>s to <h4>s and so forth.
> 
> That's it?

That, and to give authors a common way to refer to sections instead of 
using <div class="section"> with a huge variety of class names.


> So the fact that it provides explicit grouping and styling are 
> unintentional side-effects?

The only thing it adds to the grouping is the ability to have a subsection 
that is then followed by more content from the subsection's parent 
section. You couldn't do that with <hx> alone. However, for <section> 
that's more of a negative than a positive, really (it makes more sense for 
<aside>, <nav>, and <article>; <section> only allows it for consistency).


> I don't think I've come across a single person or article discussing 
> <section>, in the time since its introduction, ever even mention 
> rearranging subsections as a benefit at all, let alone the *primary* 
> benefit. That's not even mentioned in the spec itself…

The spec doesn't generally include design rationale. (If anyone would like 
to help maintain our rationale documentation, please let me know. We're 
always in need of volunteers there.)


> Furthermore, for h*, the spec provides examples of semantically 
> equivalent document structures, one with <section>s and one without, 
> concluding:
> 
> > Authors might prefer the former style for its terseness, or the latter 
> > style for its convenience in the face of heavy editing; which is besty 
> > [sic] is purely an issue of preferred authoring style.

"Its convenience in the face of heavy editing" is what I am referring to 
above with respect to being able to move stuff around without changing 
<h4>s to <h5>s etc.

(Fixed the typo, good catch.)


> If the decision to use <section> or not is purely an issue of preferred 
> authoring style, what makes <di> any different?

<di> doesn't exist. The ability to have multiple types of authoring style 
isn't the reason for <section>'s existence. It's just a side-effect of now 
having two different ways to mark up sections. It's not actually a good 
thing in language design to have multiple ways to do something (despite 
what Perl might have us believe!).


> Why is in inappropriate to have a stopgap grouping element for <dl> 
> while CSSWG works on a syntax for pseudo-grouping (if they even decide 
> to do so), yet perfectly fine for sectioning content?

<section> wasn't introduced as a stop-gap measure.

There's no such thing as a stop-gap measure on the Web. We can't add 
something then remove it. Once we've added something, it's part of the 
platform, forever. That's why we have to be careful to only add things 
that make sense on the long term.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list