home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeHTML & XHTML: The Definitive GuideSearch this book

4.8. Block Quotes

A common element in conventional documents is the block quote, a lengthy copy of text from another document. Traditionally, short quotes are set off with quotation marks, while block quotes are made entirely of separate paragraphs within the main document, typically with special indentation and sometimes italicized -- features that you may change through style or class definitions (see Chapter 8, "Cascading Style Sheets").

4.8.1. The <blockquote> Tag

All of the text within the <blockquote> and </blockquote> tags is set off from the regular document text, usually with indented left and right margins, and sometimes in italicized typeface. Actual rendering varies from browser to browser, of course.

<blockquote>

Function:

Define a block quotation

Attributes:

CITE

ONKEYUP

CLASS

ONMOUSEDOWN

DIR

ONMOUSEMOVE

ID

ONMOUSEOUT

LANG

ONMOUSEOVER

ONCLICK

ONMOUSEUP

ONDBLCLICK

STYLE

ONKEYDOWN

TITLE

ONKEYPRESS

End tag:

</blockquote>; never omitted

Contains:

body_content

Used in:

block

The HTML and XHTML standards allow any and all markup within the <blockquote>, although some physical and content-based styles may conflict with the font used by the browser for the block quote. Experimentation will reveal those little warts.

The <blockquote> tag is often used to set off long quotations from other sources. For example:

We acted incorrectly in arbitrarily changing the Kumquat
Festival date. Quoting from the Kumquat Growers' Bylaws:
<blockquote>
  The date of the Kumquat Festival may only be changed by 
  a two-thirds vote of the General Membership, provided 
  that a <strong>60 percent quorum</strong> of the Membership
  is present.
</blockquote>
(Emphasis mine) Since such a quorum was not present, the
vote is invalid.

gets displayed by Internet Explorer as an indented block of text. Figure 4-24 displays the results.

Figure 4-24

Figure 4-24. Blockquotes get their own space

4.8.2. The <q> Tag

Introduced in HTML 4.0, the <q> tag is virtually identical to its <blockquote> counterpart. The difference is in their display and application. Use <q> for short quotes that may be in line with surrounding plain text. Although not yet supported by the popular browsers, the HTML and XHTML standards dictate that the <q>-enclosed text begin and end with double-quote marks. Use the <blockquote> tag, on the other hand, for longer segments that the browser will set off -- usually as an indented block -- from the surrounding content, such as that shown in Figure 4-24.

<q>

Function:

Define a short quotation

Attributes:

CITE

ONKEYUP

CLASS

ONMOUSEDOWN

DIR

ONMOUSEMOVE

ID

ONMOUSEOUT

LANG

ONMOUSEOVER

ONCLICK

ONMOUSEUP

ONDBLCLICK

STYLE

ONKEYDOWN

TITLE

ONKEYPRESS

End tag:

</q>; never omitted

Contains:

body_content

Used in:

text



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.