Cite Element Tutorial

<cite>

Introductory Text

The cite element is as a citation or a reference on individual textual content (whereas the cite attribute may be used in conjunction with the blockquote and q elements).

The W3C HTML 4.01 specification has a vague description for this element, “Contains a citation or a reference to other sources.” HTML 5 - A vocabulary and associated APIs for HTML and XHTML states “The cite element represents the title of a work.”]

[Note: The cite attribute may be found elsewhere: Cite Attribute.]

Start tag:
<cite>
End tag:
</cite>

Use Examples

Example [HTML 4.01 (First)]:

Ill met by moonlight, proud Titania. from A Midsummer Night’s Dream.

Code [HTML]:

<p><q>Ill met by moonlight, proud Titania.</q> from »
<cite>A Midsummer Night’s Dream</cite>.</p>


Example [HTML 4.01 (Second)]:

The lunatic, the lover, and the poet are of imagination all compact, wrote William Shakespeare.

Code [HTML]:

<p><q>The lunatic, the lover, and the poet are of imagination all compact,</q> »
wrote <cite>William Shakespeare</cite>.</p>


The above two examples are written in the manner of the HTML 4.01 examples. The author and the title of the work have each been defined with a cite element. Therefore, a third use:

Example [HTML 4.01 (Third)]:

“If we shadows have offended, think but this, and all is mended, that you have but slumbered here while these visions did appear.” from A Midsummer Night’s Dream by William Shakespeare.

Code [HTML]:

<p><q>If we shadows have offended, think but this, and all is mended, »
that you have but slumbered here while these visions did appear.</q> from »
<cite>A Midsummer Night’s Dream by William Shakespeare</cite>.</p>


Example [HTML 5]:

“Cake? or, Death?” from Dress to Kill.

Code [HTML]:

<p>“Cake? or, Death?” from <cite>Dress to Kill</cite>.</p>


In the previous examples, it may have been noticed that the cite attribute cannot be used in concert with the cite element. The author and the title of the work have each been identified with a cite element but not its source. And, if the source cannot be noted in a separate line or if the source does not have a URI, this suggestion:

Example [Citation Attribute Hack (Title)]:

If we shadows have offended, think but this, and all is repaired, that you have but slumbered here while these visions did appear. from A Midsummer Night’s Dream by William Shakespeare.

Code [HTML]:

<p><q>If we shadows have offended, think but this, and all is repaired, that »
you have but slumbered here while these visions did appear.</q> from <cite »
title="CITE:The Second Folio version found in the stacks of »
the Los Angeles County Main Library, Los Angeles, »
Calif."> A Midsummer Night’s Dream by William Shakespeare</cite>.</p>


Content Model/Assigned Attributes

Element-Type:
Text-Level [HTML 4.01]
Phrasing Content [HTML 5]
Attributes:

</cite>