Name
ALIGN — NN all IE all HTML 3.2
Synopsis
ALIGN=”alignConstant"
Optional
Establishes the horizontal alignment characteristics of content
within the cell covered by the TH
element. The
HTML 4.0 specification defines settings for the
ALIGN
attribute that are not yet reflected in the
CSS specification. Therefore, this ALIGN
attribute
is not fully deprecated as it is for many other elements. As a rule,
alignment should be specified by style sheet wherever possible.
Example
<TH ALIGN="center">
Value
Navigator 4 and Internet Explorer 4 share the same attribute values, whereas HTML 4.0 has a couple more:
Value |
NN 4 |
IE 4 |
HTML 4.0 |
---|---|---|---|
center |
• |
• |
• |
char |
- |
- |
• |
justify |
- |
- |
• |
left |
• |
• |
• |
right |
• |
• |
• |
The values center
, left
, and
right
are self-explanatory. The value
justify
is intended to space content so that text
is justified down both left and right edges. For the value
char
, the CHAR
attribute must
also be set to specify the character on which alignment revolves. In
the HTML 4.0 specification example, content that does not contain the
character appears to be right-aligned to the location of the
character in other rows of the same column.
Default
left
Object Model Reference
- IE
[window.]document.all.elementID.align
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.