Skip to: content, navigation

by Ian Lloyd

cite (HTML attribute)

Browser support full matrix
IE7 FF2 Saf3 Op9.5
None None None None
Spec
Depr. Version
No HTML 3.2
cite="uri"

Here’s the same example as shown previously,This example shows the correct attribution, created using the cite attribute:

<blockquote cite="http://www.brucelawson.co.uk/index.php/2005/stupid-stock-photography/">
  <p>It's missing alt text, so it’s difficult to determine what it's
	supposed to mean. Presumably "oooh, there's been a global
	ecological catastrophe and we've got the last four leaves in the
	world and we've patented the DNA". Or they're rubbing ganja
	leaves together to extract the resin, but are too stupid to
	recognise Marijuana so are trying it with willow or silver
	birch.</p>
</blockquote>

Description

Apart from the core and event attributes, which are used across all HTML elements, blockquote has the cite attribute, which is used to identify the online source of the quotation in the form of a URI (for example, "http://sourcewebsite.doc/document.html"); the value of the cite attribute is not rendered on the screen. As such, browser support for this attribute is marked as none, but because it has other potential uses (for example, in search engine indexing, retrieval via DOM Scripting, and more), and since improved native support for the attribute is anticipated in future browser versions, you should use the cite attribute when you use blockquote.

Value

The value of cite is URI—the complete path to the source of the quotation (that is, not a relative path from the quoting page).

Compatibility

IE5.5None
6.0None
7.0None
Firefox1.0None
1.5None
2.0None
Safari1.3None
2.0None
3.0None
Opera9.2None
9.5None

cite is uniformly ignored by all browsers in a visual sense, although this potentially useful meta data could be extracted and written back in to the web page through the magic of DOM Scripting. If DOM Scripting is not the way you want to approach things—perhaps because you have a CMS that’s able to reformulate the markup to your needs—a fool-proof way to indicate the source of the quotation would be as follows (using a cite element rather than the blockquote’s cite attribute:

<blockquote>
  <p>It's missing alt text, so it’s difficult to determine what it's
  supposed to mean. Presumably "oooh, there's been a global
  ecological catastrophe and we've got the last four leaves in the
  world and we've patented the DNA". Or they're rubbing ganja
  leaves together to extract the resin, but are too stupid to
  recognise Marijuana so are trying it with willow or silver
  birch.</p>
  <p><cite><a href="http://www.brucelawson.co.uk/index.php/2005/stupid-stock-photography/">Bruce Lawson</a></cite></p>
</blockquote>

Firefox does at least provide the information to users if they go hunting for it, but it would require them to open a context menu (or right-click) and select Properties in order to display what amounts to very little information, as #cite/fig-firefox-cite shows.

Figure 1. The cite attribute's content revealed in Firefox The cite attribute's content revealed in Firefox

User-contributed notes

ID:
#2
Date:
Wed, 26 Mar 2008 13:05:28 GMT
Contributed by:
AutisticCuckoo

'The value of cite is URI—the complete path to the source of the quotation (that is, not a relative path from the quoting page).'

I can't find anything in the HTML 4.01 specification to support this statement. AFAIK the CITE attribute can contain a relative or absolute URI.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters