[whatwg] Headings and sections, role of H2-H6

Aryeh Gregor Simetrical+w3c at gmail.com
Thu Apr 29 17:08:22 PDT 2010


On Thu, Apr 29, 2010 at 5:34 AM, Steve Dennis <admin at subcide.com> wrote:
> The other thing to take into consideration is Content Management Systems.  The <section> model, while technically a much better document model, will be much much harder for things such as rich text editors to implement I would imagine.  Due to sections often being visually invisible, the nesting of invisible elements can get unmanageable and broken very easily if clients with little understanding of the document model (probably 99% of them) are editing their own content via WYSIWYG a lot.   The non-nested system of the <h1> - <h6> is much easier due to being single tags with no nesting, and every element being visually distinct.

Yeah, inserting synthetic sections into arbitrary user-submitted
content (WYSIWYG or not) is more or less impossible to do reliably.
This was suggested for MediaWiki
<https://bugzilla.wikimedia.org/show_bug.cgi?id=6104>, but you can't
do it.  Consider something like (adapted from the bug report)

<h1>Widget Sales by Year</h1>
<table>
<tr colspan="2"><th>
<h2>Widget Sales for 2006</h2>
<tr><th>Month<th>Number
...
</table>

It's not even allowed to insert a <section> in the right place here,
actually, so this particular example goes beyond automation problems.
IMO, it's not reasonable to suggest that it's inappropriate to put
headings in tables -- you could have a very long table and want its
sections to show up in your table of contents.  But you can't use any
sectioning elements here.



More information about the whatwg mailing list