Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Line Break 133

7


Output ▼


If you specify a width smaller than the actual width of the browser window, you can
also specify the alignment of that rule with the align attribute, making it flush left
(align="left"), flush right (align="right"), or centered (align="center"). By default,
rule lines are centered. Like all of the other


attributes, the align attribute has been
replaced with CSS in HTML5 for all elements that once used it. Alignment will be cov-
ered in the following lesson.


Finally, the obsolete noshade attribute causes the browser to draw the rule line as a plain
line without the three-dimensional shading.


Line Break


The
tag breaks a line of text at the point where it appears. When a web browser
encounters a
tag, it restarts the text after the tag at the left margin (whatever the cur-
rent left margin happens to be for the current element). You can use
within other
elements, such as paragraphs or list items;
won’t add extra space above or below the
new line or change the font or style of the current entity. All it does is restart the text at
the next line.


The following example shows a simple paragraph in which each line (except for the last,
which ends with a closing

tag) ends with a
:


FIGURE 7.6
Examples of rule
line widths and
heights.

Free download pdf