- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Wed, 04 Feb 2009 11:50:03 +0100
Christian Svindseth wrote: > On Feb 4, 2009, at 11:13 AM, Robert O'Rourke wrote: >> Are there any plans to bring list headers from HTML3 into HTML5? >> They'd make a lot of markup patterns simpler and be very very useful >> when it comes to styling. >> >> http://www.w3.org/MarkUp/html3/listheader.html > > Unless I'm misreading the spec completely, HTML5 supports h1-h6, and > even header elements inside list items. While you can include headings within li elements, that's different from what the lh element in HTML3, or even the label element in XHTML2, were designed for. I believe the use case is providing a title indicating the content of the list, but where the title itself shouldn't contribute to the document's outline. In HTML5, the only way to do this is to precede a list with an heading (h1-h6) element. As an example of this, consider the element summaries in the HTML 5 Reference, the attribute list has the heading Attributes, but that heading is not meant to affect the document's outline and doesn't appear in the TOC. I had to use class="no-num no-toc", which is recognised by anolis (the spec's pre-processor tool), to avoid it being included in the TOC. http://dev.w3.org/html5/html-author/#the-elements But note that the issue itself doesn't affect just lists. The same issue occurs for the DOM Interfaces sections, but that content isn't marked up as a list, and I'm also considering changing the attributes to use a table instead of a list, providing the attributes and associated descriptions. So I do not believe introducing the LH element from HTML3 would adequately address the use case. It's possible that what could be needed is an element that can contain the heading and its associated content, and behaves as a sectioning root: "Certain elements are said to be sectioning roots, including blockquote and td elements. These elements can have their own outlines, but the sections and headers inside these elements do not contribute to the outlines of their ancestors." http://www.whatwg.org/specs/web-apps/current-work/#sectioning-root It's possible that the figure element could be used for this purpose, as it is already a sectioning root, in which case we wouldn't need to add anything new to address this use case. Though it's not entirely clear to me whether the figure element's meaning allows for this case. -- Lachlan Hunt - Opera Software http://lachy.id.au/ http://www.opera.com/
Received on Wednesday, 4 February 2009 02:50:03 UTC