|
|
| <HTML> <HEAD> <TITLE>Enter the Page Title Here</TITLE> </HEAD> <BODY> <CENTER> The following blocks of text are center-aligned: <P>This is paragraph one or line one because it consists of a single line only.</P> <P>This paragraph, which follows paragraph one is paragraph two. It consists of more than one statement. It is actually composed of three statements and occupies more than one line.</P> </CENTER> </BODY> </HTML> |

The align attribute of the <P align=value> and </P> tags control how paragraphs are aligned. The value of the align attribute can be "left", "center", "right", or "justify" .
Click here to review how the following document appears in a Web browser.
| <HTML> <HEAD> <TITLE>Enter the Page Title Here</TITLE> </HEAD> <BODY> <P align="left">The text of this paragraph is left-aligned. A left-aligned paragraph has a smooth left edge but a ragged right edge. The text of this paragraph is left-aligned. A left-aligned paragraph has a smooth left edge but a ragged right edge. The text of this paragraph is left-aligned. A left-aligned paragraph has a smooth left edge but a ragged right edge.</P> <P align="center">The text of this paragraph is center-aligned. A center-aligned paragraph has ragged left and right edges. The text of this paragraph is center-aligned. A center-aligned paragraph has ragged left and right edges. The text of this paragraph is center-aligned. A center-aligned paragraph has ragged left and right edges.</P> <P align="right">The text of this paragraph is right-aligned. A right-aligned paragraph has a ragged left edge but a smooth right edge. The text of this paragraph is right-aligned. A right-aligned paragraph has a ragged left edge but a smooth right edge. The text of this paragraph is right-aligned. A right-aligned paragraph has a ragged left edge but a smooth right edge.</P> <P align="justify">The text of this paragraph is justified. A justified paragraph has smooth left and right edges. The text of this paragraph is justified. A justified paragraph has smooth left and right edges. The text of this paragraph is justified. A justified paragraph has smooth left and right edges. The text of this paragraph is justified. A justified paragraph has smooth left and right edges.</P> </BODY> </HTML> |
To align more than one paragraph of text with the same alignment option, you may use the <DIV> and </DIV> tags.
The <DIV> and </DIV> tags also support the align attribute, which works similarly as that with the <P> and </P> tags.

The <PRE> and </PRE> tags support extra blank spaces and carriage returns without the <BR> tag.
Click here to review how the following document appears in a Web browser.
<HTML> you have made in your HTML document, they are ignored by the Web
browser. |
However, note that the text is displayed in monospaced fonts.

The <BLOCKQUOTE> and </BLOCKQUOTE> tags indent an entire paragraph of text.
Click here to review how the following document appears in a Web browser.
<HTML>
|
Note that the extra blank spaces and carriage returns within the <BLOCKQUOTE> and </BLOCKQUOTE> tags are still ignored. However, other HTML tags (e.g., <B> and </B>) are allowed.
