Fashions in HTML programming come and go almost as quickly as fashions in clothing. Two useful tags which have waxed and waned in fashion several times are BLOCKQUOTE and HR. BLOCKQUOTE is used to set off a block of quotation. HR (Hard Rule) is used to create a dividing line across an HTML page.
Tag: BLOCKQUOTE
Description: Set off a quotation from other text. Similar to P (paragraph), except that it indents text automatically.
Example:
<blockquote> "But, soft! What light through yonder window breaks?<br /> It is the east, and Juliet is the sun!"<br /> -- <cite>William Shakespeare</cite> </blockquote>
Displayed:
"But, soft! What light through yonder window breaks?
It is the east, and Juliet is the sun!"
-- William Shakespeare
Tag: HR
Description: Inserts a dividing line, or hard rule, across an HTML page. Its appearance may be modified using selected attributes (deprecated), or using CSS.
Example (inserted between two paragraphs of text):
<p>Here is a paragraph of text.</p> <hr /> <p>Here is another paragraph of text.</p>
Displayed:
Here is a paragraph of text.
Here is another paragraph of text.
Because the HR tag doesn't close, don't forget to use the XHTML shorthand closing syntax, as demonstrated in the example above.
Tag: HR
Attribute: SIZE
Value: integer representing thickness of hard rule in pixels
Description: sets HR thickness. Deprecated in HTML 4 (use CSS instead)
Example:
<hr size="5" />
Displayed:
Tag: HR
Attribute: WIDTH
Value: integer representing width of hard rule, in pixels. May also be set to percentage value (representing percentage of browser window width).
Description: sets HR width. Deprecated in HTML 4 (use CSS instead)
Example:
<p>Paragraph of text.</p> <hr width="300" /> <p>Paragraph of more text.</p> <hr width="50%" /> <p>Final paragraph of text.</p>
Displayed:
Paragraph of text.
Paragraph of more text.
Final paragraph of text.
Tag: HR
Attribute: ALIGN
Value: left, right, center
Description: sets the alignment of a hard rule on a page. Deprecated in HTML 4 (use CSS instead)
Example:
<hr width="200" align="left" />
Displayed:
Hard rules are usually inserted to indicate section breaks in a long document, or as a divider or decorative element. HR tags used to be used with such frequency that they came to be associated with unimaginative web page design, and should be used sparingly.
Although I have not given you specific exercises to practice BLOCKQUOTE and HR, I strongly urge you to experiment with these tags until you feel completely comfortable using them. HR, in particular, is a very standard element of traditional HTML programming.
Copyright © 2001 Michael Masumoto. All Rights Reserved.