A Complete Guide to Web Design

(やまだぃちぅ) #1
110 Chapter 7 – Formatting Text

Summary of Text Tags


Web Design in a Nutshell, eMatter Edition

<pre> NN: 2, 3, 4 - MSIE: 2, 3, 4, 5 - HTML 4 - WebTV - Opera3
<pre>...</pre>

Delimits preformatted text, meaning that lines are displayed exactly as they are
typed in, honoring multiple spaces and line breaks. Text within<pre>tags will be
displayed in a monospace font such as Courier.
Attributes
width=value
This optional attribute determines how many characters to fit on a single line
within the<pre> block.

<wbr> NN: 2, 3, 4 - MSIE: 2, 3, 4, 5 -HTML 4- WebTV - Opera3
<wbr>

Indicates a potential word break point. The<wbr>tag works only when placed
within<nobr>-tagged text and causes a line break only if the current line already
extends beyond the browser’s display window margins.

Lists


The following is a collection of tags used for formatting a number of different
types of lists in HTML. Any list can be nested within another list.

<dir> NN: 2D, 3D, 4 - MSIE: 2, 3, 4, 5 - HTML 4D- WebTV - Opera3
<dir>...</dir>

Creates a directory list consisting of list items<li>. Directory lists were originally
designed to display lists of files with short names, but they have been deprecated
with the recommendation that unordered lists (<ul>) be used instead. Most
browsers render directory lists the same as unordered lists (with bullets), although
some will use a multicolumn format.

<dl> NN: 2, 3, 4 - MSIE: 2, 3, 4, 5 - HTML 4 - WebTV - Opera3
<dl>...</dl>

Indicates a definition list, consisting of terms (<dt>) and definitions (<dd>).
Attributes
compact
Makes the list as small as possible. Few browsers support the compact
attribute.
Free download pdf