Using a
|
|
1. |
Type
<code>
,
<tt>
,
<kbd>
, or
<samp>
.
|
|
2. |
Type the text that you want to display in a monospaced font.
|
|
3. |
Type
</code>
,
</tt>
,
</kbd>
, or
</samp>
. Use the tag that matches the one you chose in step 1.
|
Tips
Remember that the monospaced font tags will not have a very dramatic effect in browsers that display all their text in monospaced fonts (like Lynx: http://www.delorie.com/web/lynxview.html ).
You can also format several lines of monospaced text with the pre tag (see page 73) .
You can apply any font (that your visitor has installed) to your text with styles (see page 152) .
Using Preformatted Text
Usually, browsers collapse all extra returns and spaces and automatically break lines according to the
To use preformatted text:
Figure 4.9. The
pre
element is ideal for text that contains important spaces and line breaks, like the
|