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

Definition

The <cite> tag is used to identify the title of a citation or creative work.

Example


<img src="https://upload.wikimedia.org/wikipedia/commons/0/0d/Self-Portrait_with_a_Straw_Hat_%28obverse-_The_
Potato_Peeler%29_MET_DT1502_cropped2.jpg" width="220" height="277" alt="Self portrait, straw hat by Van Gogh"
> <p><cite>Self-Portrait with a Straw Hat (obverse- The Potato Peeler)</cite> by Vincent Van Gogh</p>
Self portrait, straw hat by Van Gogh

Self-Portrait with a Straw Hat (obverse- The Potato Peeler) by Vincent Van Gogh

Attributes

The following attributes can be used with the <cite> tag.


<cite> Specific Attributes
Attribute Value Description Example
There are no required or optional attributes specific to the <cite> tag.
<cite> Global Attributes
Attribute Description Example
Common
classSpecifies a classname for the element allowing you to apply the style of the predefined class to the content.

<cite class="name">Citation Text</cite>
idSpecifies a unique id for the element allowing you to apply the style of the predefined id to the content.

<cite id="name">Citation Text</cite>
styleSpecifies an inline style for the element allowing you to apply the style to the contentt.

<cite style="color:red;">Citation Text</cite>
titleSpecifies an inline style for the element allowing you to apply the style to the content.

<cite title="Content info">Citation Text</cite>
Keyboard
accesskeySpecifies a keyboard shortcut to associate with the element.

<cite accesskey="a">Citation Text</cite>
tabindexSpecifies a tab order for the element.

<cite tabindex="1">Citation Text</cite>
Language
dirSpecifies the directional flow of the content.

<!-- The text will flow from left to right -->
<cite dir="ltr">Citation Text</cite>
<!-- The text will flow from right to left -->
<cite dir="rtl">Citation Text</cite>
langSpecifies a language code for the content of the element.

<cite lang="en">Citation Text</cite>
spellcheckSpecifies an inline style for the element allowing you to apply the style to the contentt.

<!-- Valid values true and false. -->
<!-- Default inherited / browser specific. -->
<cite spellcheck="true">Citation Text</cite> 
translateSpecifies an inline style for the element allowing you to apply the style to the content.

<!-- Valid values yes and no. -->
<!-- Default yes. -->
<cite translate="no">Citation Text</cite> 
Miscellaneous
contenteditableSpecifies whether the content of the element is editable.

<!-- Valid values true and false. -->
<!-- Default inherited. -->
<cite contenteditable="true">Citation Text</cite> 
draggableSpecifies whether the element is draggable.

<!-- Valid values true and false. -->
<!-- Default browser specific. -->
<cite draggable="true">Citation Text</cite>
hiddenSpecifies whether the element is not yet, or no longer, relevant.

<!-- Valid values an empty string or hidden -->
<cite hidden>Citation Text</cite> 
<cite hidden="hidden">Citation Text</cite> 
<cite> Event Attributes
Attribute Description Example
Document Element
oncopyThe script to be run when the user copies the content of an element.

 <!-- Executes go() function -->
<cite oncopy="go()">Citation Text</cite> 
oncutThe script to be run when the user cuts the content of an element.

 <!-- Executes go() function -->
<cite oncut="go()">Citation Text</cite>
onpasteThe script to be run when the user pastes some content into an element.

 <!-- Executes go() function -->
<cite onpaste="go()">Citation Text</cite>
Drag and Drop
ondragThe script to be run when an element is dragged.

 <!-- Executes go() function -->
<cite ondrag="go()">Citation Text</cite>
ondragendThe script to be run when an element has stopped being dragged.

 <!-- Executes go() function -->
<cite ondragend="go()">Citation Text</cite>
ondragenterThe script to be run when an element has been dragged to a valid drop target.

 <!-- Executes go() function -->
<cite ondragenter="go()">Citation Text</cite>
ondragleaveThe script to be run when an element leaves a valid drop target.

 <!-- Executes go() function -->
<cite ondragleave="go()">Citation Text</cite>
ondragoverThe script to be run when an element is being dragged over a valid drop target.

 <!-- Executes go() function -->
<cite ondragover="go()">Citation Text</cite>
ondragstartThe script to be run at the start of a drag operation.

 <!-- Executes go() function -->
<cite ondragstart="go()">Citation Text</cite>
ondropThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<cite ondrop="go()">Citation Text</cite>
Form
onblurThe script to be run when the element loses focus.

 <!-- Executes go() function -->
<cite onblur="go()">Citation Text</cite>
onchangeThe script to be run when object changed and attempt to leave field.

 <!-- Executes go() function -->
<cite onchange="go()">Citation Text</cite>
oncontextmenuThe script to be run when a context menu is triggered.

 <!-- Executes go() function -->
<cite oncontextmenu="go()">Citation Text</cite>
onfocusThe script to be run when the element gets focus.

 <!-- Executes go() function -->
<cite onfocus="go()">Citation Text</cite>
oninputThe script to be run when an element gets user input.

 <!-- Executes go() function -->
<cite oninput="go()">Citation Text</cite>
oninvalidThe script to be run when an element is invalid.

 <!-- Executes go() function -->
<cite oninvalid="go()">Citation Text</cite>
onresetThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<cite onreset="go()">Citation Text</cite>
onselectThe script to be run when some or all of the contents of an object are selected.

 <!-- Executes go() function -->
<cite onselect="go()">Citation Text</cite>
onsubmitThe script to be run when a form is submitted.

 <!-- Executes go() function -->
<cite onsubmit="go()">Citation Text</cite>
Keyboard
onkeydownThe script to be run when an element is in focus and keyboard key is pressed down.

 <!-- Executes go() function -->
<cite onkeydown="go()">Citation Text</cite>
onkeypressThe script to be run when an element is in focus and keyboard key is pressed down and released.

 <!-- Executes go() function -->
<cite onkeypress="go()">Citation Text</cite>
onkeyupThe script to be run when an element is in focus and keyboard key is released.

 <!-- Executes go() function -->
<cite onkeyup="go()">Citation Text</cite>
Media
onabortThe script code to be run on abort.

 <!-- Executes go() function -->
<cite onabort="go()">Citation Text</cite>
oncanplayThe script to be run when a file has buffered enough so it is ready to start playing.

 <!-- Executes go() function -->
<cite oncanplay="go()">Citation Text</cite>
oncanplaythroughThe script to be run when a file can be played all the way to the end without further need of buffering.

 <!-- Executes go() function -->
<cite oncanplaythrough="go()">Citation Text</cite>
oncuechangeThe script to be run when the cue changes when using the track element.

 <!-- Executes go() function -->
<cite oncuechange="go()">Citation Text</cite>
ondurationchangeThe script to be run when the length of the media is changed.

 <!-- Executes go() function -->
<cite ondurationchange="go()">Citation Text</cite>
onemptiedThe script to be run when a media resource element suddenly becomes empty, usually due to an error.

 <!-- Executes go() function -->
<cite onemptied="go()">Citation Text</cite>
onendedThe script to be run when the media has reach the end.

 <!-- Executes go() function -->
<cite onended="go()">Citation Text</cite>
onloadeddataThe script to be run when media data is loaded and playback can start.

 <!-- Executes go() function -->
<cite onloadeddata="go()">Citation Text</cite>
onloadedmetadataThe script to be run when metadata has been loaded.

 <!-- Executes go() function -->
<cite onloadedmetadata="go()">Citation Text</cite>
onloadstartThe script to be run whenthe media resource has started loading.

 <!-- Executes go() function -->
<cite onloadstart="go()">Citation Text</cite>
onpauseThe script to be run when the media resource has been paused.

 <!-- Executes go() function -->
<cite onpause="go()">Citation Text</cite>
onplayThe script to be run when the media resource starts playback.

 <!-- Executes go() function -->
<cite onplay="go()">Citation Text</cite>
onplayingThe script to be run when when playback has already begun.

 <!-- Executes go() function -->
<cite onplaying="go()">Citation Text</cite>
onprogressThe script to be run when the browser is fetching the media data.

 <!-- Executes go() function -->
<cite onprogress="go()">Citation Text</cite>
onratechangeThe script to be run when the playback rate changes.

 <!-- Executes go() function -->
<cite onratechange="go()">Citation Text</cite>
onseekedThe script to be run when the seeking attribute is set to false indicating that seeking has finished.

 <!-- Executes go() function -->
<cite onseeked="go()">Citation Text</cite>
onseekingThe script to be run when the seeking attribute is set to true indicating that seeking is currently active.

 <!-- Executes go() function -->
<cite onseeking="go()">Citation Text</cite>
onstalledThe script to be run when the browser is unable to continue fetching media data.

 <!-- Executes go() function -->
<cite onstalled="go()">Citation Text</cite>
onsuspendThe script to be run when media data has stopped before being completely loaded.

 <!-- Executes go() function -->
<cite onsuspend="go()">Citation Text</cite>
ontimeupdateThe script to be run when the media resources current playback position has changed.

 <!-- Executes go() function -->
<cite ontimeupdate="go()">Citation Text</cite>
onvolumechangeThe script to be run when the volume has changed or been muted.

 <!-- Executes go() function -->
<cite onvolumechange="go()">Citation Text</cite>
onwaitingThe script to be run when the media resource has paused but is expected to resume.

 <!-- Executes go() function -->
<cite onwaiting="go()">Citation Text</cite>
Mouse
onclickThe script to be run when when a mouse is clicked on an element.

 <!-- Executes go() function -->
<cite onclick="go()">Citation Text</cite>
ondblclickThe script to be run when a mouse is double clicked on an element.

 <!-- Executes go() function -->
<cite ondblclick="go()">Citation Text</cite>
onmousedownThe script to be run when he mouse button is pressed down while the cursor is over an element.

 <!-- Executes go() function -->
<cite onmousedown="go()">Citation Text</cite>
onmousemoveThe script to be run when the mouse button is moved.

 <!-- Executes go() function -->
<cite onmousemove="go()">Citation Text</cite>
onmouseoutThe script to be run when the mouse cursor moves off an element.

 <!-- Executes go() function -->
<cite onmouseout="go()">Citation Text</cite>
onmouseoverThe script to be run when the mouse cursor moves over an element.

 <!-- Executes go() function -->
<cite onmouseover="go()">Citation Text</cite>
onmouseupThe script to be run when the mouse button is released while the cursor is over the element.

 <!-- Executes go() function -->
<cite onmouseup="go()">Citation Text</cite>
onwheelThe script to be run when the mouse wheel rolls up or down over an element.

 <!-- Executes go() function -->
<cite onwheel="go()">Citation Text</cite>
Scroll
onscrollThe script code to be run when the scrollbar of an element is being scrolled.

 <!-- Executes go() function -->
<cite onscroll="go()">Citation Text</cite> 
Window - NONE

Relevant HTML Tutorials

HTML Basics - Text Tags