[whatwg] <cite> versus |cite|

Matthew Raymond mattraymond at earthlink.net
Sun Jan 14 12:12:37 PST 2007


Anne van Kesteren wrote:
> On Fri, 12 Jan 2007 12:51:05 +0100, Matthew Raymond wrote:
>> | <p>
>> |   <q cite="#Hixie">How times have changed</q>, said
>> |   <cite id="Hixie">
>> |     <a href="http://ln.hixie.ch/?start=1163122250&count=1">
>> |       Ian
>> |     </a>
>> |   </cite>.
>> | </p>
> 
> How about:
> 
>    <p><q source=foo>Blah</q>, said <a href=... id=foo>Baz</a></p>

   Well, first of all, it doesn't cover cases without hyperlinks:

| <p><q>Blah</q>, said Baz</p>

   Above, you have no parent to associate with. "Ah, but you could just
use a <span>!", you might say. But if you're going to use a parent
element, <cite> is obviously better from a semantic standpoint:

| <p><q source="foo">Blah</q>, said <cite id="foo">Baz</cite></p>

   And if you're going to do that, you might as well always use <cite>
like I have in the original example. It doesn't make sense to use <cite>
in one case and not use it in another.

   As for |source| versus |cite|, I see two problems. First is that the
attributes are so similar that they could get easily confused. Second is
that "source" is essentially the long form of "src", which may cause
even more confusion:

| <img source="confused.png" alt="Avoid attributes with similar names.">

   Is it really too confusing to allow authors to cite a <cite>
attribute? It does strike me as a mild hack, but no more than <datalist>.



More information about the whatwg mailing list