NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix a » html element reference

<q> (Quote)


This element indicates that the enclosed text is a short inline quotation.

Standard Syntax


<q
cite="url of source"
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric string"
lang="language code"
style="style information"
title="advisory text">
</q>

Attributes Defined by Internet Explorer


accesskey="key"(5.5)
contenteditable="false | true | inherit"(5.5)
disabled="false | true"(5.5)
hidefocus="true | false"(5.5)
language="javascript | jscipt | vbs | vbscript"(4)
tabindex="number"(5.5)

Standard Event Attributes


onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmouseomove, onmouseout, onmouseover, onmouseup

Events Defined by Internet Explorer


onactivate, onbeforedeactivate, onbeforeeditfocus, onblur, oncontrolselect, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onfocus, onmouseenter, onmouseleave, onmove, onmoveend, onmovestart, onreadystatechange, onresizeend, onresizestart, onselectstart, ontimeerro

Element Specific Attributes


cite

The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote.


Example


<q style="color: green">A few green balls and a rainbow bar will give you an exciting Web page Christmas Tree!</q>

Compatibility


HTML 4, 4.01
XHTML 1.0, 1.1, Basic
Internet Explorer 4, 5, 5.5, 6
Netscape 6, 7
Opera 4-7

Notes


This element is intended for short quotations that don't require paragraph breaks, as compared to text that would be contained within <blockquote>.

Some browsers, like Internet Explorer, may not make any sort of style change for quotations, but it is possible to apply a style rule.

Most modern standards-aware browsers, like Mozilla, Opera, and Safari, should add quotes around text enclosed within the q element.

(X)HTML Elements
CSS Properties
Previous: pre Next: rt
< Home | About | Chapters | Examples | Errata | Reference | Site Map >