- Home
- /
- Tutorials
- /
- HTML Tutorial
- /
- HTML <cite> Tag
HTML Tags
HTML <cite> Tag
The cite tag marks the title of a creative work: a book, film, song, painting, article, website or game. It shows in italics by default. It is for titles only, not for people's names.
That rule is the part people get wrong. <cite>Inception</cite> by Christopher Nolan is correct; <cite>Christopher Nolan</cite> is not. It often appears next to quotes, together with the blockquote tag and the q tag.
Syntax
html
<cite>Title of the Work</cite>There are no special attributes, only the global ones such as class, id, style and title. Do not confuse it with the cite attribute of <blockquote> and <q>, which holds a web address.
Example
html
<!DOCTYPE html>
<html>
<head>
<title>Cite Tag Example</title>
<style>
cite {
font-style: italic;
color: #2c3e50;
}
</style>
</head>
<body>
<h1>HTML <cite> Tag Example</h1>
<p>
The painting <cite title="Mona Lisa by Leonardo da Vinci">Mona Lisa</cite> is one of the most famous artworks in the world.
</p>
<p>
The movie <cite class="film" id="inception" style="color:#e67e22;">Inception</cite> directed by Christopher Nolan received critical acclaim.
</p>
</body>
</html>"Mona Lisa" and "Inception" appear as titles in italics, and Inception is also orange from its inline style. Hover over "Mona Lisa" and the tooltip from its title appears.
Good to know
- Remove the italics with CSS if your style guide prefers quotation marks for some titles:
cite { font-style: normal; }. - A title can also be a link:
<cite><a href="...">The Art of War</a></cite>. - For the name of the person you are quoting, write it as normal text, for example after a dash.
Browser Support
Chrome | Edge | Firefox | Safari | Opera | IE9+ |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
HTML <cite> Tag exercises
Name a book
Write this paragraph and mark the book's title as the title of a work: The Pragmatic Programmer is worth reading.
Result
