A Complete Guide to Web Design

(やまだぃちぅ) #1
Layout Techniques with HTML 125

Formatting
Text

Layout Techniques with HTML

Web Design in a Nutshell, eMatter Edition

as preformatted. If you need a number of blank spaces within a sentence, use
nonbreaking space characters ( ) instead.


Preventing Line Breaks


Text and graphics that appear within “no-break” () tags always display on
one line, and are not wrapped in the browser window. If the string of characters
or elements within
tags is very long, it continues off the browser window
and users need to scroll horizontally to the right to see it, as shown in Figure 7-15.


Thetag can be used to hold together a row of graphics, such as the
buttons of a toolbar, so they will always display as one piece.


Adding a
within
tagged text will cause the line to break.


The word-break () is an esoteric little tag that can be used in conjunction
with the no-break tag.is used to indicate a potential word break point
within
tagged content. When the “no-break” segment extends beyond the
browser window, thetag tells it exactly where it is permitted to break the
line, as shown in Figure 7-16. It keeps line lengths from getting totally out of hand.


Figure 7-14: Teletype text


Figure 7-15: Nonbreaking text


<TT>
Calories Carb(g) Fat(g)
French Fries 285 38 14
Fried Onion Rings 550 26 47
Fried Chicken 402 17 24
</TT>

text extends beyond
browser window.

<NOBR>Good food gives more than immediate pleasure. It's
a key to your family's health and vitality.</NOBR>
Free download pdf