[whatwg] the cite element

Ian Hickson ian at hixie.ch
Sun Jul 19 02:58:08 PDT 2009


On Wed, 1 Jul 2009, Erik Vorhes wrote:
> On Tue, Jun 30, 2009 at 11:19 PM, Ian Hickson<ian at hixie.ch> wrote:
> > I don't understand why it would be more useful. Having an element for 
> > the typographic purpose of marking up titles seems more useful than an 
> > element for the purpose of indicating what is a citation.
> 
> Why is it more useful?

Because typographically, titles of works are styled differently. In the 15 
or more years that <cite> has supposedly been used for citations, I'm only 
aware of one actual use of that semantic, and that use has since been 
discontinued. Meanwhile, lots of people use <cite> for "title of work".


> If <cite> is exclusively for titles, it shouldn't be called <cite>.

Sure, but we're about 15 years too late for that.


> In addition to the semantic difference between a title and a citation, 
> limiting <cite> to titles potentially raises confusion between this 
> element and the cite attribute (for <blockquote> and <q>), as the latter 
> is limited to URLs.

In practice, people haven't been confused between these two attributes as 
far as we can tell. People who use <cite> seem to use it for titles, and 
people who use cite="" seem to use it for URLs. (The latter is rare.)


> While it makes some sense, I suppose, to limit the cite attribute to 
> URLs, it makes absolutely no sense to limit the <cite> element only to 
> titles. If it's so pressing for there to be an element allowed in the 
> <body> to mark up titles, why not create a new element for that purpose

A new element wouldn't work in legacy UAs, so it wouldn't be as compelling 
a solution. Also, <cite> is already being used for this purpose.


> or allow for a <cite>-specific attribute to note that designation?

What is the pressing need for an element for citations, which would 
require that we overload <cite> with two uses?


> I understand HTML5's attempts to provide semantic value to such elements 
> as <i>, <b>, and <small>. To at the same time remove semantic value at 
> the same time is completely asinine.

If <cite>'s original meaning has value, that is true; what is its value?


> > Note that HTML5 now has a more detailed way of marking up citations, 
> > using the Bibtex vocabulary. I think this removes the need for using 
> > the <cite> element in the manner you describe.
> 
> Since this is supposed to be the case, why shouldn't HTML5 just ditch 
> <cite> altogether? (Aside from "backward compatibility," which is beside 
> the point of the question.)

Backwards compatibility (with legacy documents, which uses it to mean 
"title of work") is the main reason.


On Wed, 1 Jul 2009, Bruce Lawson wrote:
> On Wed, 01 Jul 2009 17:36:34 +0100, Kristof Zelechovski
> <giecrilj at stegny.2a.pl> wrote:
> 
> > The CITE tag does not mean "I am a citation".  It is as confusing for 
> > novices as can be but the specification cannot do anything about it 
> > because it is already established.  It means "Citing what?" and it 
> > does not mean "Citing whom?".
>
> There is no reason at all why it can't be defined as "citing whom".

The main reason would be that there doesn't appear to be a useful purpose 
to doing that.


On Wed, 1 Jul 2009, Erik Vorhes wrote:
> On Wed, Jul 1, 2009 at 11:49 AM, Kristof
> Zelechovski<giecrilj at stegny.2a.pl> wrote:
> > I can imagine two reasons the CITE element cannot be defined as "citing
> > whom":
> >  1. Existing tools may assume it contains a title.
> 
> Existing tools (which I would assume follow the HTML 4.01 spec)

It appears this assumption is mistaken.


> While the HTML 4.01 specification is hardly perfect, I don't see the 
> value in limiting the semantic potential of the <cite> element in HTML5.

As far as I can tell, increasing it from citations to titles of works is 
actually increasing its semantic potential, not limiting it.


On Wed, 1 Jul 2009, Philip Taylor wrote:
> 
> In practical usage it seems to be used for more than titles: 
> <http://philip.html5.org/data/cite.txt>. (But I haven't tried working 
> out what else it is used for, or how commonly it's used for titles.)

Indeed, there is a lot of misuse of the element -- as alternatives for 
<q>, <i>, <em>, and HTML5's meaning of <cite>, in particular.

Expanding it to cover the meanings of <q>, <i>, and <em> doesn't seem as 
useful as expanding it just to cover works.


On Thu, 9 Jul 2009, Brian Campbell wrote:
> 
> There are plenty of times when you want to mark up someone's name. For 
> instance, if you're quoting someone in a testimonial, you may want the 
> quote to appear in normal roman text, but the person's name who you are 
> quoting to be in italic and right aligned:
> 
> "Best value for the money!"
>           -- J. Random User
> 
> I might format this as:
> 
> <aside class="testimonial">
>   <q>Best value for the money!</q>
>   <cite>J. Random User</cite>
> </aside>

Certainly there are situation-specific cases where names might be styled, 
but I think it's mostly as a side-effect of location rather than because 
the text is a name. Consider:

 <aside class="testimonial">
   <q>Best value for the money!</q>
   J. Random User
 </aside>

 <aside class="bookquote">
   <q>Best value for the money!</q>
   A Random Book
 </aside>

 <aside class="review">
   <q>Best value for the money!</q>
   Newspaper
 </aside>

 <aside class="logfiles">
   <q>[23:02] evaluator: best value</q>
   filename.log
 </aside>


> Here's an example of someone asking about this specific use case, of how 
> to mark up a testimonial and its source:
> 
> http://stackoverflow.com/questions/758785/what-is-the-best-way-to-markup-a-testimonial-in-xhtml
> 
> (note that I don't believe the uses of <blockquote> mentioned here, 
> including by me, are correct, as the citation actually refers to the 
> quote rather than being part of it, but I think the use of <cite> is 
> perfectly reasonable)

The very first proposal on that page:

  <div class="testimonial">
   <blockquote>i love your products</blockquote>
   <span>Jim Testimonial-giver</span>
  </div>

...is absolutely fine.


> The Mozilla Style Guide also uses formatting for <cite> that I believe 
> would be appropriate for citing either a work or a person:
> 
> http://www.mozilla.org/contribute/writing/markup#quotations

In the past, <cite> has only been appropriate for citations. So it makes 
sense that some pages would recommend that, especially pages by people 
who have presumably read the specs.


> Of course, it's generally preferable to cite a work, rather than a 
> person, as then the citation can be verified; if you just include a 
> person's name, you have to assume that they mean "personal 
> correspondence" which is unverifiable, or simply that the work is left 
> unspecified and someone else will have to track it down. But people do 
> write quotes and attribute the quotation to the person rather than the 
> work, and as HTML is about marking up content and not about enforcing 
> academic standards, I don't see why HTML5 should be adding this 
> unenforceable restriction that doesn't seem to add much value.

The "unenforceable" part is a red herring; all the semantic definitions 
are uncheckable and everything in the entire spec is unenforceable.

I think it's clear that people want to use <cite> for things other than 
citations, and in fact do use it that way widely. If we're increasing it 
past just citations, then there seems to be clear value to using it to 
mark up titles; there doesn't seem to be much value in marking up titles 
and just any names (they're styled differently in practice), and marking 
up any title but only names of people who have been quoted is just weird.


> I wonder if there is value in specifying the semantics of elements like 
> <cite> in much detail, in cases where there is no way to automatically 
> verify those semantics and there is no use case for machine processing 
> of those semantics. It seems that whatever the definition of <cite> is, 
> you're going to need to use a microformat or microdata or RDFa to 
> actually provide semantics that are machine-readable, so the spec should 
> be relatively loose and leave the precise semantics up to one of the 
> more flexible systems for specifying semantics.

What's the alternative? Just say "em, i, cite and dfn mean 'italics'"? 
That doesn't seem particularly useful either. Why not just drop all but 
<i> if that's what we do?

No, it seems useful to have elements that people can use for specific 
purposes, so that style sheets can be shared, so that tools can make use 
of the elements, if only in limited circles.


On Thu, 9 Jul 2009, Tab Atkins Jr. wrote:
> 
> FWIW, in the corporate sites I control I mark up testimonial
> quotations using <blockquote> and <cite>, like this:
> 
> <blockquote>
>   testimonial testimonial testimonial
>   <cite>Joe Sixpack</cite>
> </blockquote>

This is clearly wrong, since the name isn't part of the quote.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list