[whatwg] the cite element
Smylers at stripey.com
Thu Aug 13 02:59:04 PDT 2009
Erik Vorhes writes:
> So the definition of <cite> in HTML5 should currently be "title of
> work or something that could be construed as a title where one doesn't
> exist in the explicit sense of 'title.' But not people's names, even
> if they're the citation, because using <cite> for citations is silly."
Hi Erik. Rather than start with the <cite> element and think how you
can use it, I find it easier to understand t'other way round:
When writing text you sometimes want some words to be presented
differently (typically in italics), to convey some information to
readers. If the semantic you wish the italicized text to convey is that
it's the title of a published work, then <cite> is the appropriate HTML
element to use for this.
(When word processing many folks simply use italics, meaning titles are
marked up the same as, say, emphasis. This precludes later changing the
house style in a way which distinguishes them, and from having voice
output use different voice variants for each.)
If you wish the graphical presentation of such titles to be something
other than italic (underlined perhaps, or in a different colour, or in
normal text but surrounded by quote marks) then you can achieve that
with CSS. But the semantic is still there in the document, so can still
be conveyed to all readers and listeners, regardless of their
environment and user-agents.
For words that you wish to have no distinct presentation from the
surrounding text -- words that readers don't need calling out to them as
being in any way 'special' -- simply don't mark them up.
As Ian has pointed out, the above is technically non-conforming with
what the HTML 4 spec claims. But it's how I've been using <cite> for
years, since it makes sense and has a use.
Other proposed definitions of <cite> may more closely correspond to the
English word "cite", but the set of phrases they would denote do not
seem to be a useful set of things to lump together; they do not match
any set of things which are typically conveyed to readers in a
particular way (for example by typographical conventions).
While HTML 5's definition of <cite> is a useful thing to have an element
for, the name 'cite' is not a great choice to label that. However the
element already exists; its previous definition has overlap with the
useful definition; and its default display in existing browsers is the
common typographic style for the useful definition (which gives weight
to the idea that the HTML 5 definition is actually what at least some
people intended in the first place, or have already been using it as).
So tweaking the definition to be more useful seems better than inventing
a new element with a better name.
More information about the whatwg