align
Horizontal Alignment (NISO JATS table model)
Sets the horizontal (line) alignment inside a table cell. (This attribute is based on
and intended to be converted easily to the XHMTL align attribute.)
Remarks
The @align attribute is used in two
different ways:
- It specifies the horizontal alignment for the entire cell (such as “center” or “justify”).
- It is
used for aligning values in table cells on a particular character within the cell,
commonly a decimal point. Alignment on a particular character requires that three
attributes be set in the XML document:
- The @align attribute value is set to the word “char”.
- The @char attribute value is set to the actual character to use for the aligning, for example, to align on a decimal point, the “.” character.
- The @charoff attribute value is set to the percent of the current column width to be placed to the left of the (left edge of the) alignment character, for example, “30”.
Used on these Elements:
Value | Meaning |
---|---|
center | Center align the cell contents. |
char | Align the text on the character identified with the @char attribute. |
justify | Fully justify cell contents (right and left justification). |
left | Left justify cell contents. |
right | Right justify cell contents. |
Restriction | This is an optional attribute; there is no default. |
Example 1
... <table border="2" rules="groups" style="border-collapse: collapse; border-style: solid;" width="298"> <col width="41.86%"/> <col width="58.14%"/> <thead> <tr> <th align="center" scope="col" style="border-left: solid 1px; border-top: solid 1px; border-right: solid 1px; border-bottom: solid 2px" valign="middle"><bold>Shore AO value</bold></th> <th align="center" scope="col" style="border-left: solid 1px; border-top: solid 1px; border-right: solid 1px; border-bottom: solid 2px" valign="middle"><bold>Value of spring force</bold>, <italic>F</italic>, <bold>in</bold> mN<break/> (Δ<italic>F</italic>= ± 37,5 mN)<xref ref-type="fn" rid="table-fn_23.1"><sup>a</sup></xref></th> </tr> </thead> <tbody> <tr> <td align="center" scope="row" style="border-left: solid 1px; border-top: solid 1px; border-right: solid 1px; border-bottom: solid 1px" valign="middle">0</td> <td align="center" style="border-left: solid 1px; border-top: solid 1px; border-right: solid 1px; border-bottom: solid 1px" valign="middle">550,0</td> </tr> <tr> <td align="center" scope="row" style="border-left: solid 1px; border-top: solid 1px; border-right: solid 1px; border-bottom: solid 1px" valign="middle">10</td> <td align="center" style="border-left: solid 1px; border-top: solid 1px; border-right: solid 1px; border-bottom: solid 1px" valign="middle">1 300,0</td> </tr> <tr> <td align="center" scope="row" style="border-left: solid 1px; border-top: solid 1px; border-right: solid 1px; border-bottom: solid 1px" valign="middle">20</td> <td align="center" style="border-left: solid 1px; border-top: solid 1px; border-right: solid 1px; border-bottom: solid 1px" valign="middle">2 050,0</td> </tr> ... </tbody> </table> ...
Example 2
... <table border="0" width="1800"> <colgroup> <col width="4*"/> <col width="89*"/> <col align="center" width="6*"/> </colgroup> <tbody> <tr> <td></td> <td></td> <td>(ft)</td> </tr> <tr> <td align="center">(a)</td> <td>Insulated supply service drops limited to 300 V to ground</td> <td>10.5</td> </tr> ... </tbody> </table> ...