Syntax
<CENTER>...</CENTER>
Attribute Specifications
common attributes
Contents:
Inline elements, Block-level elements
Contained in:
APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH
<CENTER>
<TABLE>
<TR ALIGN=center>
<TH SCOPE=col>Name</TH>
<TH SCOPE=col>Age</TH>
<TH SCOPE=col>Country</TH>
</TR>
<TR ALIGN=center>
<TD>Liam Quinn</TD>
<TD>20</TD>
<TD>Canada</TD>
</TR>
</TABLE>
</CENTER>
| Name | Age | Country |
|---|---|---|
| Liam Quinn | 20 | Canada |
|
Note that CENTER only centers the table as a whole, not the contents of each table cell. The preceding example uses the ALIGN attribute of TR to center the contents of each cell. The text-align property of Cascading Style Sheets provides greater flexibility in suggesting horizontal alignment. |