[whatwg] Footnotes, endnotes, sidenotes
michel.fortin at michelf.com
Tue Oct 31 05:34:02 PST 2006
Le 30 oct. 2006 à 15:33, Ian Hickson a écrit :
>>> * note and reference for footnotes, endnotes, and sidenotes (not
>>> aside in “HTML5”)
>> Yes, this is an area where document and converter authors
>> currently need
>> to come up with their own class-based hacks. Ideally a continuous
>> user agent could show footnotes in context so that they don't
>> become de
>> facto endnotes.
> If anyone has any ideas on this, please post them to the list. (The
> group is also looking at footnotes closely.) One thing to consider
> looking at footnotes is "would the title="" attribute handle this
> use case
> as well as what I'm proposing?". If the answer is "yes", or
> "almost", then
> it's probably not a good idea to introduce the new feature.
Would the title attribute be suffisent? I don't think so. The main
problem being that an attribute cannot contain any markup (links,
I'm all for a syntax for footnotes (and sidenotes, and endnotes). The
question is what do we want a footnote markup to accomplish?
Minimally, it should associate a note with its context so that you
know there is a note and that you can refer to it if you want. This
definition encompass a couple of methods to do such notes that are in
use currently, in HTML and elsewhere.
1. One of them, mostly used with sidenotes, is to have the note
directly in the text:
<p>Some text <span class="sidenote">this is a sidenote to put
in the margin</span> and some other text.</p>
With pretty trivial CSS, you can then put all the sidenotes in the
footnotes at the bottom of the page. This method is also consistent
with how word processors treat footnotes: as distinct pieces of text
inserted punctually at some place in the main text but which are
2. Some syntaxes meant to be written directly by humans, like Latex,
also allow you to defer the note content until a later time to make
things more readable. In these cases, you put a marker in the text,
then associate the marker with the note content which can be placed
elsewhere in the document. This make the text more readable. My own
text-to-HTML tool (PHP Markdown Extra, semi-private beta version 1.1)
use such a syntax:
Paragraph linked to a footnote[^1].
[^1]: This is the footnote content.
Some other paragraph.
I'm not aware of anyone doing this for footnotes or sidenotes in
HTML; it doesn't seem very practical to style either.
3. The last method of expressing footnotes in HTML is to create
markers in the text and put the footnotes in an ordered list at the
bottom of the page. For instance, my text-to-HTML tool generates this
markup from the above example:
<p>Paragraph linked to a footnote
<sup><a id="fnref:1" href="#fn:1" rel="footnote">1</a></sup>.
<p>Some other paragraph</p>
<p>This is the footnote content.
<a href="#fnref:1" rev="footnote">↩</a>
This provides a trivial way to style footnotes as footnote, it'll
even looks good unstyled and is completely backward compatible.
- - -
Before defining a markup for footnotes or sidenotes, I think it'd be
a good idea to see what goals the syntax should fulfill. Is backward
compatibility one of them, or should we always rely on the browser
capabilities to relocate footnotes where they should be, or should we
Some other things to take into consideration:
* Footnotes should probably not be allowed to escape their
enclosing article element. For instance, if you have a couple of
weblog articles on your main page, each article having some
footnotes, it'd probably not be a good idea to have footnotes from
all articles mixed together in the same list.
* Although not necessarily very common, some people like to put
multiple paragraphs, lists, and some other block-level elements in
footnotes and sidenotes (more often seen in sidenotes in books). I
think it'd be a good idea to allow that in the markup.
* Sidenotes may not be achievable in the browsers's default
stylesheet without adding a side margin. They could always be
displayed as float, but it seems to me that footnotes would be the
best fallback mechanism. Sidenotes are also impractical on small
screens too. That's why I believe that, ideally, footnotes and
sidenotes should share the same markup, styling is what should make
I'm not yet proposing any markup, I want to start the discussion on
what it should accomplish, and what is realistic.
michel.fortin at michelf.com
More information about the whatwg