Extensible HyperText Markup Language

blockquote

Definition

The blockquote element is used to identify larger amounts of quoted text.

Example

  1. <blockquote site="http://example.net/armstrong/">
  2. <p>That's one small step for man, one giant leap for mankind.</p>
  3. </blockquote>

Best practice

blockquote is possibly the most misused element. Many WYSIWYG editors incorrectly use it to visually indent content, as seen in the following screen shot.

Screen shot of a toolbar in a typical WYSIWYG editor showing a button labeled as Increse Indent that generates the blockquote element.

Instead, the correct way to indent content is by using CSS. For example:

CSS:

  1. p.indent {margin-left:40px}

Markup:

  1. <p class="indent">The quick brown fox jumps over the lazy dog.</p>

Note

The contents of blockquote should be block elements. For example: p, div, h1 to h6, ol, ul, dl, etc.

Heading elements (h1 to h6) used inside blockquotes are not considered part of the document outline.

Attributes

Basic

cite
(URI) This attribute is intended to supply information about the source from which the quotation was borrowed. For example: urn:ISBN 88-7633-000-3 or http://xhtml.com/interviews/.

Common core attributes

class
(NameTokens) This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or set of class names. Multiple class names must be separated by white space characters. Class names are typically used to apply CSS formatting rules to an element.
id
(ID) This attribute assigns an ID to an element. This ID must be unique in a document. This ID can be used by client-side scripts (such as JavaScript) to select elements, apply CSS formatting rules, or to build relationships between elements.
title
(Text) This attribute offers advisory information. Some Web browsers will display this information as tooltips. Assistive technologies may make this information available to users as additional information about the element.

Common internationalization attributes

xml:lang
(NameToken) This attribute specifies the base language of an element's attribute values and text content.
dir

This attribute specifies the base direction of text. Possible values:

  • ltr: Left-to-right
  • rtl: Right-to-left

Common event attributes

onclick
(Script) A client-side script event that occurs when a pointing device button is clicked over an element.
ondblclick
(Script) A client-side script event that occurs when a pointing device button is double-clicked over an element.
onmousedown
(Script) A client-side script event that occurs when a pointing device button is pressed down over an element.
onmouseup
(Script) A client-side script event that occurs when a pointing device button is released over an element.
onmouseover
(Script) A client-side script event that occurs when a pointing device is moved onto an element.
onmousemove
(Script) A client-side script event that occurs when a pointing device is moved within an element.
onmouseout
(Script) A client-side script event that occurs when a pointing device is moved away from an element.
onkeypress
(Script) A client-side script event that occurs when a key is pressed down over an element then released.
onkeydown
(Script) A client-side script event that occurs when a key is pressed down over an element.
onkeyup
(Script) A client-side script event that occurs when a key is released over an element.

Common style attribute

style
(Text) This attribute specifies formatting style information for the current element. The content of this attribute is called inline CSS. The style attribute is deprecated (considered outdated), because it fuses together content and formatting.

Contains

See also