<cite>
The title of a work: a book, an article, a movie, a song, a game, or a piece of software.
- Display
- inline
- Closing tag
- Required
- Permitted content
- Phrasing content
Example
#<p>
To start, I recommend the book <cite>The Pragmatic Programmer</cite>,
and for practicing logical thinking, the game <cite>Minecraft</cite>.
</p>Definition and usage
#The <cite> element marks the title of a work: a book, an article, a movie, a TV series, a song, a game, a painting, a website, or a piece of software. Browsers display it in italics.
According to the HTML standard, <cite> wraps only the title, not the author’s name. In a quote’s caption, write the author’s name as plain text, and put only the source’s title inside <cite>.
Don’t confuse the <cite> element with the cite attribute, which on <blockquote>, <q>, <ins>, and <del> holds an invisible source address. The element shows the title to the reader; the attribute leaves the address for machines.
Syntax
#<cite>Title of the work</cite>Attributes
#This element has no attributes of its own. It supports the global attributes, such as class, id and hidden.
More examples
#<figure>
<blockquote>
<p>The best way to learn programming is by writing programs.</p>
</blockquote>
<figcaption>From the guide <cite>First Steps in CodeWorlds</cite></figcaption>
</figure>Default CSS
#Most browsers display this element with these default styles:
cite {
font-style: italic;
}Browser support
#Widely available
Works in all modern browsers, phones included. You can use it without worry.
- Chrome
- Edge
- Firefox
- Safari
Good practices
#- Mark only the title of the work with the element, not the person.
- Put the quote itself in
<blockquote>or<q>, and the source title in a nearby<cite>. - If italics don’t fit your design, change them in CSS. The element’s meaning stays the same.
Related entries
#- <blockquote>A longer quotation from another source, displayed as a separate, indented block.
- <q>A short quote woven into a sentence. The browser adds the quotation marks itself.
- <i>Text in a different tone or voice: foreign expressions, Latin names, a character’s thoughts, technical terms.
- <em>Stress in a sentence: a word that, read aloud, is pronounced with emphasis.
Spotted a mistake or missing an example? Write to us.