HTML <q> tagS2C Home   « HTML <q> tag

Definition

The <q> tag is used to define a short inline quotation.

Example


<q>Text will be wrapped with quotation marks.</q>
Text will be wrapped with quotation marks.

Attributes

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


<q> Specific Attributes
Attribute Value Description Example
citeattributeSpecifies a URL pointing to the source of the quotation.

<q cite="aURL">Quotation text</q>
<q> 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.

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

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

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

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

<q accesskey="a">Quotation Text</q>
tabindexSpecifies a tab order for the element.

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

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

<q lang="en">Quotation Text</q>
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. -->
<q spellcheck="true">Quotation Text</q> 
translateSpecifies an inline style for the element allowing you to apply the style to the content.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 <!-- Executes go() function -->
<q oncanplay="go()">Quotation Text</q>
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 -->
<q oncanplaythrough="go()">Quotation Text</q>
oncuechangeThe script to be run when the cue changes when using the track element.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Relevant HTML Tutorials

HTML Basics - Text Tags