On Mon, Feb 25, 2008 at 10:29 PM, Ian Hickson <<a href="mailto:ian@hixie.ch">ian@hixie.ch</a>> wrote:<br><br>> On Thu, 8 Feb 2007, Jorgen Horstink wrote:<br>> > On Feb 8, 2007, at 9:00 PM, David Latapie wrote:<br>
> > > On Thu, 8 Feb 2007 19:17:32 +0000, Nicholas Shanks wrote:<br>> > > > On 6 Feb 2007, at 07:57, Karl Dubost wrote:<br>> > > ><br>> > > > > > unlikely. "div" and "span" elements didn't exist in HTML+.<br>
> > > > ><br>> > > > > <a href="http://www.w3.org/MarkUp/HTMLPlus/htmlplus_1.html">http://www.w3.org/MarkUp/HTMLPlus/htmlplus_1.html</a><br>> > > ><br>> > > > Ironically I was just reading that earlier today, then saw your<br>
> > > > post! (I hadn't been reading this thread.)<br>> > > ><br>> > > > I wish the <image>fallback</image> tags had made it through the<br>> > > > years. It's so much better than <img alt="blah"> and doesn't suffer<br>
> > > > from the self-closing-tag-in-html problem.<br>> > ><br>> > > HTML 3.0 too had some great ideas. I'm still missing<br>> > > - FN (but CSS3 has something about footnote that may fix this)<br>
> > > - LH (caption for list! A must-have)<br>> ><br>> > Why not using the title attribute?<br>><br>> Actually with <figure> the <lh> element is now better handled using<br>
> <figure> and <legend>.<br><br>Using <figure> and <legend>:<br><a href="http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cscript%3Edocument.createElement('figure')%3C%2Fscript%3E%3Ctitle%3ETitle%3C%2Ftitle%3E%3Cp%3E...%3C%2Fp%3E%0A%3Cfigure%3E%0A%20%20%3Clegend%3EList%20title%3C%2Flegend%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A%3C%2Ffigure%3E">http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cscript%3Edocument.createElement('figure')%3C%2Fscript%3E%3Ctitle%3ETitle%3C%2Ftitle%3E%3Cp%3E...%3C%2Fp%3E%0A%3Cfigure%3E%0A%20%20%3Clegend%3EList%20title%3C%2Flegend%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A%3C%2Ffigure%3E</a><br>
While this isn't horrible, it isn't supported properly, as noted before. FF currently just ignores the fact that there's a <legend> tag at all and treats the list title as a plain text node. IE7 treats the <legend> as an unknown tag and the title as a plain text node, even if you try to apply the createElement shim.<br>
<br>Using <lh>:<br><a href="http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cscript%3Edocument.createElement('lh')%3C%2Fscript%3E%3Ctitle%3ETitle%3C%2Ftitle%3E%3Cp%3E...%3C%2Fp%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Clh%3EList%20title%3C%2Flh%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A">http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cscript%3Edocument.createElement('lh')%3C%2Fscript%3E%3Ctitle%3ETitle%3C%2Ftitle%3E%3Cp%3E...%3C%2Fp%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Clh%3EList%20title%3C%2Flh%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A</a><br>
On the other hand, <lh> seems to be supported just fine in FF *and* IE7 (with the shim). This solution is usable *immediately*, which is a big plus. Since we only want to allow a single header per list, though, I'd prefer fully embracing the parallel with <table> and naming this element <lhead>, thus implying it must come first and at most once.<br>
<br>At this point, though, why not just bend the definition of <ul> and <ol> and allow <hx> tags directly? Both FF and IE7 form good DOM trees with this markup.<br><a href="http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cscript%3Edocument.createElement('lhead')%3C%2Fscript%3E%3Ctitle%3ETitle%3C%2Ftitle%3E%3Cp%3E...%3C%2Fp%3E%0D%0A%20%20%3Cul%3E%0D%0A%20%20%20%20%3Ch1%3EList%20title%3C%2Fh1%3E%0D%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0D%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0D%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0D%0A%20%20%3C%2Ful%3E%0D%0A">http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cscript%3Edocument.createElement('lhead')%3C%2Fscript%3E%3Ctitle%3ETitle%3C%2Ftitle%3E%3Cp%3E...%3C%2Fp%3E%0D%0A%20%20%3Cul%3E%0D%0A%20%20%20%20%3Ch1%3EList%20title%3C%2Fh1%3E%0D%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0D%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0D%0A%20%20%20%20%3Cli%3EList%20item%3C%2Fli%3E%0D%0A%20%20%3C%2Ful%3E%0D%0A</a><br>
This solution doesn't seem to have a drawback, really. It's already supported (*without* an IE shim), doesn't require the creation of a new element, and is completely intuitive. Just specify (like thead) that it must be at the start of the list, and can occur at most once.<br>
<br>At this point, of course, one must wonder why we don't just stick with a conforming idea and pop that <hx> into the first <li>. Well, obviously, this doesn't establish the appropriate semantics. An <hx> *within* an <li> is a header for the content *within* the <li>, not for the containing list. Popping the header into the list directly as a first child would establish this, while allowing you to effortlessly mess with the style via CSS selectors (ul > * to give a uniform look to the contents, ul > hx to style only list headers, etc.). And, as noted, it's already handled uniformly and appropriately in at least two major browsers, and there is no need to introduce *another* new element for someone to learn. All you need to do is adjust the nesting rules for <ul> and <ol> slightly (and probably <dl> and <dialog> as well), which only has an effect on validators.<br>
<br>I don't have the ability to check this in Opera and other browsers atm. Anyone want to step up?<br>