HTML <cite>
Tag
The <cite>
tag is used to define the title of a creative work, such as a book, movie, song, or painting. It should be used when citing the source of a quote or a piece of text.
Example:
<p>According to <cite>The Great Gatsby</cite>, "You can't repeat the past."</p>
Output:
According to The Great Gatsby, "You can't repeat the past."
<cite>
Tag Attributes
Attribute | Description |
---|---|
title | Specifies the title of the cited work |
class | Specifies one or more class names for the element (space-separated) |
id | Specifies a unique id for the element |
Examples with Attributes:
<p>According to <cite title="The Great Gatsby" class="book" id="citation">this source</cite>, "You can't repeat the past."</p>
Output:
According to this source, "You can't repeat the past."