cite (HTML attribute)
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
| IE | 5.5 | None |
|---|---|---|
| 6.0 | None | |
| 7.0 | None | |
| Firefox | 1.0 | None |
| 1.5 | None | |
| 2.0 | None | |
| Safari | 1.3 | None |
| 2.0 | None | |
| 3.0 | None | |
| Opera | 9.2 | None |
| 9.5 | None |
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.
User-contributed notes
- ID:
- #2
- Date:
- Wed, 26 Mar 2008 13:05:28 GMT
'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.

