Document formatting

BY WIL GERKEN

Document formatting tags include line breaks, paragraph breaks, text centering, left alignment, right alignment, and block quoting. For more advanced document formatting tags, please refer to tables.

Line breaks and paragraph breaks are the two most commonly used tags and they are also the first rule breakers we've encountered, because they do not come in sets like other tags. A single line break tag is <br> which only takes one line break. A paragraph break tag is <p> and it actually takes two line breaks. <p> = <br> + <br>

For example:

Here is line 1 followed by a <p> tag.

Here is line 2.

Here is line 1 followed by a <br> tag.
Here is line 2.

One important rule to be aware of is: you can NOT stack <p> tags, but you can stack <br> tags.

For example:

Here is line 1 followed by four <p><p><p><p> tags.

Here is line 2 (notice how the stacked tags had no additional affect).

Here is line 1 followed by four <br><br><br><br> tags.



Here is line 2 (notice how the stacked tags lowered the line 4 times).




To align text to the left, center or right, you use the <div></div> tag which contains an argument called align. By default, all text is aligned to the left, so it uncommon to use the <div> tag to achieve this.

Examples:

<div align=left>
This text is left aligned
</div>

<div align=center>
This text is centered
</div>

<div align=right>
This text is right aligned
</div>

Notice when turning off a tag, you do not repeat the arguments. In the above example, </div> was used, not </div align=right> to turn off the tag.




One additional and tag for text alignment is blockquote. The blockquote tag brings text in off the margins. It affects both the left and right margin. The blockquote tag can be stacked.

For example:

<blockquote>
This text is blockquoted. Notice how the use of the blockquote tag brought the text in from the current left margin and the current right margin.
</blockquote>

<blockquote><blockquote>
This text is double blockquoted bringing the text in from both margins twice as much as a single blockquote.
</blockquote></blockquote>


Page Back Page Forward

Home . About . Syllabus . Design Guide . Message Board

©1997-98 Wil Gerken