Read HTML The Definitive Guide Online
Authors: Chuck Musciano Bill Kennedy
Since the
tag, and because it might not be supported in later version of the language, we recommend that you stay away from using. 4.7.8 The
Tag (Obsolete) Like the
tag, the tag is obsolete and should not be used. We include it here mostly for historical reasons. ; never omitted
Function:
Render a block of text without any formatting Attributes:
CLASS
STYLE
End tag:
Contains:
literal_text
Used in:
block
The
tag formats text just like the tag with a specified width of 80 characters.However, unlike the
tag, you don't have to replace the literal <, >, and & characters with their entity equivalents within anblock. The name is short for "example"; the language's designers intended that the tag be used to format examples of text originally displayed on 80-column wide displays. Because the 80-column display has mostly gone the way of green screens and teletypes, and since the effect of a tag is basically the same as , don't use; it may disappear entirely in subsequent versions of HTML. 4.7.9 The
Tag (Obsolete) Throw thetag out of your bag of HTML tricks; it's obsolete, like and . Included here for historical reasons, authors once used to tell the browser to treat the rest of your document's text just as written with no markup allowed. There was no ending tag for (of course, no markup!), but there was an end to . Forget about it.
Function:
Render a block of text without any formatting Attributes:
None
End tag:
None
Contains:
literal_text
Used in:
block
4.6 Expanded Font Handling
4.8 Block Quotes
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 9).4.8.1 The
TagAll of the text within the
andtags 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.
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:
; never omitted
Contains:
body_content
Used in:
block
The HTML standard allows any and all markup within the
, 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
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:The date of the Kumquat Festival may only be changed by a two-thirds vote of the General Membership, provided that a 60 percent quorum of the Membership is present.
(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: Blockquotes get their own space
4.8.1.1 The cite attributeThe cite attribute lets you indicate the source of a quote. The attribute's value should be a quote-enclosed URL that points to the online document and, if possible, the exact location in the document where the quote came from.
For instance, you could cite the specific section in the Kumquat Grower's Bylaws in our example.
Presumably, someday the browser may actually let you click and view that specific citation via its embedded URL. Today, you must embed an explicit hyperlink to the document; see Chapter 7, Links and Webs:
4.8.1.2 The dir and lang attributesThe dir attribute lets you advise the browser as to which direction the text within the
segment ought to be displayed, and lang lets you specify the language used within that tag.
[The dir attribute, 3.5.1.1] [The lang attribute, 3.5.1.2]4.8.1.3 The class, id, style, and title attributes
Use the style attribute to specify an inline style for thetag, or use the class
attribute to apply a predefined style class to the tag. [Inline Styles: The style Attribute, 9.1.1]
[StyleYou may assign a unique id to the
tag, as well as a title, using the respective attribute and accompanying quote-enclosed string value.
[The id attribute, 4.1.1.4]
[The title attribute,4.8.1.4 Event attributes
Like with most other tagged segments of content, user-related events can happen in and around the
tag, such as when a user clicks or double-clicks within its display space. Many of these events are recognized by the browser if it conforms to the HTML 4.0 specification (none do fully). With the respective "on" attribute and value, you may react to that event by displaying a user dialog box or activating some multimedia event.
[JavaScript Event Handlers, 13.3.3]4.8.2 The
Tag