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

Table of contents tag for html 5?

From: Daniel Benamy <dbenamy@optonline.net>
Date: Tue, 22 Jan 2008 16:57:06 -0500
Message-ID: <1ca741370801221357j74b448e5reb23d9dbb2b15982@mail.gmail.com>
To: public-html-comments@w3.org

I was thinking it might be useful to have a table of contents tag
which would generate a table of contents for the page based on the
heading tags. The entries in the table would be links to the
appropriate spot in the document. So maybe this html:

<toc />

<p>I like foo.</p>

<p>Nice bar.</p>
<p>More text.</p>

would produce:

Table of Contents
* Foo
* Bar
   * Baz

I like foo.

Nice bar.

More text.

There could also be attributes which control how the table of contents
is generated, such as whether the entries are numbered or not or which
headings are included (all, only those after the <toc>, only those
before, only headings greater than n, etc.)

I did a quick search and didn't see anything like this been discussed.
Did I miss it? Does it make sense to anyone else?

Received on Wednesday, 23 January 2008 04:22:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:24 UTC