You can align paragraphs, headings and other document division in a number of ways. You can use the ALIGN attribute with paragraphs or headings to center-align, right-align, or left-align these elements.
Using the ALIGN Attribute in Heading and Paragraphs
The Align attribute is used to center-align, or right-align headings and paragraphs by using an attribute value of either “center” or “right”.
Example:
To center align a level-two heading
H2>
ALIGN=”CENTER”> Your Heading Here
/H2>To right-align level-two heading
H2>
ALIGN=”RIGHT”> Your Heading Here
/H2>Center Text and Other Elements Using the Center Tag
The CENTER element is used to center-align text and other document elements.
Example:
HTML>
HEAD>
TITLE> My Web Page
/TITLE>
/HEAD>
BODY>
CENTER>
H2> Level-Two-Heading
/H2>
P> This paragraphs, and the level-two heading above it, is center using the center tag.
UL>
LI> First list item
LI> Second list item
/UL>
/CENTER>
/BODY>
/HTML>
0 comments:
Post a Comment