Description
HTML element <cite>
is used to define a citation or reference to another source, which is displayed in italic on the browser by default.
It is commonly used to include a reference to creative work like a book, poem, movie, sculpture, painting, etc.,
The below table summarizes its usage.
Usage Details | |
Placement | It is displayed as an Inline element. |
Contents | It can contain Inline elements and text. |
Tags | Both the opening and closing tags are required. |
Versions | HTML 2, 3.2, 4, 4.01, and 5 |
Syntax
Here is the basic syntax of the <cite>
element.
<cite>...</cite>
Examples
In the below example, the <cite>
element is used to refer to a movie and a painting.
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<h1>HTML Element - cite</h1>
<p>My favorite movie is <cite>Harry Potter</cite>.</p>
<p>My favorite painting is <cite>Monalisa</cite>.</p>
</body>
</html>
Attributes
The following table shows the list of supported and unsupported attributes for the <cite>
tag.
Attribute Type | Details |
Element-Specific Attributes | The tag <cite> doesn't have any element-specific attributes. |
Global Attributes | Like all other HTML tags, the tag <cite> supports the HTML Global Attributes. |
Event Attributes | The tag <cite> also supports the HTML Event Attributes. |
Browser Compatibility
The tag <caption>
is supported in all modern browsers.
- Google Chrome 1+
- Internet Explorer or Edge 2+
- Firefox 1+
- Apple Safari 1+
- Opera 4+