Full Page for Printing
The blockquote container tag is useful, not only for long pieces of text which are quoted material and therefore need to be set apart and indented, but also as a general tool to indent or set off for emphasis even single words or phrases. For example:
This section of text is surrounded by the <BLOCKQUOTE>...</BLOCKQUOTE> tags. A <BLOCKQUOTE> can be used inside a paragraph container, but always has an implied line break before and after the <BLOCKQUOTE>...</BLOCKQUOTE> pair, just as with headings or paragraphs themselves. In a sense, a <BLOCKQUOTE> is a "mini-paragraph" within a paragraph.The <BLOCKQUOTE> pair is set up as follows:
<BLOCKQUOTE> ...text of any length...</BLOCKQUOTE>
Back to...TOP
Back
to...Designing Web Pages
<DL><DT>This is the first term to be defined: <DD>This is the definition of the first term. <DT>This is the second term to be defined: <DD>This is the definition of the second term. If the definition is longer than the display is wide, the text will wrap around to the indent margin, creating an effect similar to </BLOCKQUOTE> but without the right margin indent.</DL>The above code displays as follows:
This creates an interesting use of the <DL>...</DL> container, a parallel to the <OL>...</OL> and <UL>...</UL> structures, but without the leading empty line and without bullets or numbers.
<DL>
<DT>This is a list of whatchamacallits:
<DD>Red whatchamacallits
<DD>Blue whatchamacallits
<DD>Green whatchamacallits</DL>
produces the following display:
Back
to...TOP
Back to...Designing Web Pages
Up
to
...Useful Lists
Down to...Combining Lists
<OL> <LI>This is the first item in the list< LI>This is the second item in the list <LI>This is the third item in the list </OL>The above HTML code displays as follows:
However, if you wish to use an introductory line to "set-up" the list (as with the "Whatchamacallits" in the <DL> example), that line would precede the opening tag and would be followed by the list's first empty line (as the words The above HTML code displays as follows: display above). Substituting <LH> for <LI> in either the <OL>...</OL> or <UL>...</UL> structures removes the bullets and numbers from the indented lines.
Back to...TOP
Back
to...Designing Web Pages
<OL> <LI>This is the first item in the list< LI>This is the second item in the list <LI>This is the third item in the list </UL>The above HTML code displays as follows:
However, if you wish to use an introductory line to "set-up" the list (as with the "Whatchamacallits" in the <DL> example), that line would precede the opening tag and would be followed by the list's first empty line (as the words The above HTML code displays as follows: display above), just as with the <OL> list.
Back
to...TOP
Back to...Designing Web Pages
Up to
...Useful Lists
Down to...Combining Lists
It is possible to nest either the <OL> or the <UL> lists. The designer must keep track of the container pairs, however, to avoid cross-nesting as described in the section Tags in General.
Conceptually, build the list out, or up and down, from the innermost (green) container, through the middle level (red) containers, to the outside (blue) container. The following demonstrates a three-level, three-category list in both <OL> and <UL> lists:
<OL> List Nest:
|
<UL> List Nest:
|
Back to...TOP
Back to...Designing Web Pages
Up to
...Useful Lists
Down to...Combining Lists
As before, conceptually, build the list out, or up and down, from the innermost (green) container, through the middle level (red) containers, to the outside (blue) container. The following demonstrates a three-level, three-category list combining <OL> and <UL> structures:
| HTML Code for <OL> <LI>Item 1 <UL> <LI>Item 1-a <LI>Item 1-b </UL> <LI>Item 2 <UL> <LI>Item 2-a <UL> <LI>Item 2-a-1 <LI>Item 2-a-2 </UL> <LI>Item 2-b </UL> <LI>Item 3 <OL> <LI>Item 3-a <LI>Item 3-b </OL> </OL> |
<OL> and <UL> Combined
Lists:
|
![]() |
Back to...TOP
Back
to...Designing Web Pages