Name
ALIGN — NN n/a IE 3 HTML 4
Synopsis
ALIGN=”alignConstant"
Optional
Establishes the horizontal alignment characteristics of content
within column(s) covered by the COLGROUP
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 a rule, alignment should be specified by
style sheet wherever possible.
Internet Explorer 3 documents label this attribute
HALIGN
. In practice, IE 3 for Windows appears to
ignore both the ALIGN
and
HALIGN
attribute for the
COLGROUP
element.
Example
<COLGROUP CLASS="dateCols" WIDTH="15" ALIGN="right" SPAN=3>
Value
HTML 4.0 and IE 4 have two sets of attribute values:
Value |
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.
It is important to bear in mind that the ALIGN
attribute applies to every row of a column, including any
TH
element you specify for the table. If you want a different alignment for the column header, ...
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.