CENTER
The CENTER element is exactly equivalent to specifying the
DIV
element with the align attribute set to "center". Use of the CENTER
element to align text is deprecated.
align = left|center|right|justify - Deprecated
Deprecated Example:
<H1 align=center>Centered Head Element</H1>
Aligning <H> elements with CSS will allow you to change
your alignment at a future date without the necessity of physically
changing the alignment on each <H> element. To change the
alignment from "center" to "right" on all <H1> elements, for
example, you would alter
H1 { text-align: center} to
H1 { text-align: right}
|
CSS Example:
To center all instances of <H1>
|
<HEAD>
<TITLE>Centered Head Element</TITLE>
<STYLE type="text/css">
H1 { text-align: center}
</STYLE>
</HEAD>
<BODY>
<H1> Centered Head Element </H1>
|
To center specific instances of <H1>
|
<HEAD>
<TITLE>Center Specific Head Elements</TITLE>
<STYLE type="text/css">
H1.wdvl {text-align: center}
</STYLE>
</HEAD>
<BODY>
<H1 class="wdvl"> Center Specific Head Elements </H1>
<H1>Un-centered Head Element</H1>
|
Additional Resources:
HTML 4.01 Tags
|