HTML <cite> tagS2C Home   « HTML <cite> tag

Definition

The <cite> tag is used to define a citation.

Example


<cite>This text will be be a citation.</cite>

Required Attributes

NONE

Optional Attributes

NONE

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<cite class="classname">Citation text here</cite>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<cite id="idname">Citation text here</cite>

style - specifies an inline style for the element allowing you to apply the style to the content.


<cite style="color:red;text-align:left">Citation text here</cite>

title - specifies extra information about the content.


<cite title="information about the content">Citation text here</cite>

Language Attributes

dir - specifies the directional flow of the content.


<!-- The text will flow from left to right -->
<cite dir="ltr">Citation text here</cite>

<!-- The text will flow from right to left -->
<cite dir="rtl">Citation text here</cite>

lang - specifies a language code for the content of the element.


<cite lang="en">Citation text here</cite>

xml:lang - specifies a language code for the content of the element in XHTML documents.


<cite xml:lang="fr">Citation text here</cite>

Document Event Attributes

NONE

Form Event Attributes

NONE

Image Event Attributes

NONE

Keyboard Event Attributes

onkeydown - The JavaScript code to be run when an element is in focus and keyboard key is pressed.


<!-- Executes the go() function -->
<cite onkeydown="go()">Citation text here</cite>

onkeypress - The JavaScript code to be run when an element is in focus and keyboard key is pressed down and released.


<!-- Executes the go() function -->
<cite onkeypress="go()">Citation text here</cite>

onkeyup - The JavaScript code to be run when an element is in focus and keyboard key is released.


<!-- Executes the go() function -->
<cite onkeyup="go()">Citation text here</cite>

Mouse Event Attributes

onclick - The JavaScript code to be run when a mouse is clicked on the element.


<!-- Executes the go() function -->
<cite onclick="go()">Citation text here</cite>

ondblclick - The JavaScript code to be run when a mouse is double clicked on the element.


<!-- Executes the go() function -->
<cite ondblclick="go()">Citation text here</cite>

onmousedown - The JavaScript code to be run when the mouse button is pressed down while the cursor is over the element.


<!-- Executes the go() function -->
<cite onmousedown="go()">Citation text here</cite>

onmousemove - The JavaScript code to be run when the mouse button is moved.


<!-- Executes the go() function -->
<cite onmousemove="go()">Citation text here</cite>

onmouseout - The JavaScript code to be run when the mouse cursor moves off an element.


<!-- Executes the go() function -->
<cite onmouseout="go()">Citation text here</cite>

onmouseover - The JavaScript code to be run when the mouse cursor moves over an element.


<!-- Executes the go() function -->
<cite onmouseover="go()">Citation text here</cite>

onmouseup - The JavaScript code to be run when the mouse button is released while the cursor is over the element.


<!-- Executes the go() function -->
<cite onmouseup="go()">Citation text here</cite>

go to home page Homepage go to top of page Top