tadam logo

HTML <blockquote> cite Attribute

Example

A quotation with a cite attribute that specifies the source of the quotation
<blockquote cite="http://en.wikiquote.org/wiki/Quotations">
It needs no dictionary of quotations to remind me that the eyes are the windows of the soul.
</blockquote>
The output of the code above will be:

Definition and Usage

The cite attribute specifies the source of a quotation.

Browser Support

The cite attribute is not supported by any of the major browsers. But because it has other potential uses (for example, in search engine indexing, retrieval of its content 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.

Syntax

<blockquote cite="value">

Attribute Values

ValueDescription
URLThe source of the quotation.

Possible values:

  • An absolute URL - Points to another web site (like cite="http://www.example.com")
  • A relative URL - Points to a page within a web site (like cite="example.html")
  • An anchor URL - Points to a named anchor (like cite="#bottom")

Example

This example shows an attribution, created using the cite attribute
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<style>
blockquote:after
{
  content:attr(cite);
  color:#900;
  font:normal normal normal 0.66em/1.1 sans-serif;
  position:absolute;
  bottom:-1.35em;
  right:0.1em;
}

blockquote 
{
  color:#009;
  font:italic normal normal 1em georgia,serif;
  padding:0 0 15px 0;
  margin:0;
  border-bottom:1px solid #900;
  position:relative;
}

blockquote > p
{
  margin:0;
}
</style>
<body>
<blockquote cite="http://www.alistapart.com/articles/taminglists/">
  <p>
    Believe it or not, we have just scratched the 
    surface of what can be done to modify lists with
    style sheets.
  </p>
</blockquote>
</body>
</html>
The output of the code above will be:
Was this information helpful?
   

Comments