This group of attributes contains only those used for HTML table styling.
Related elements:
frame attribute:
rules attribute:
border attribute:
cellspacing attribute:
cellpadding attribute:
align attribute:
COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR
valign attribute:
COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR
char attribute:
COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR
charoff attribute:
COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR
span attribute:
rowspan attribute:
colspan attribute:
Attribute characteristics and purpose:
frame attribute:
- specifies which side of the frame surrounding table will be visible
- possible values: void (no sides, default), above (top), below (bottom), hsides (top, bottom), vsides (left, right), lhs (left), rhs (right), box (all), border (all)
rules attribute:
- specifies which rules will show between cells
- possible values: none (default), groups (between row groups (<thead>, <tbody>, <tfoot>) and column groups (<colgroup>, <col>)), rows, cols, all
border attribute:
- defines the width (pixels) of the frame around the table
cellspacing attribute:
- specifies the space between cells
cellpadding attribute:
- specifies the space between cell border and its content
align attribute:
- specifies table's data alignment and text justification
- values are: left (default), center, right, justify and char (aligns text around specific character)
- align attribute used to be widely used for many other elements but have been deprecated and replaced with style sheets
valign attribute:
- specifies vertical alignment of data in a cell
- possible values: top, middle (default), bottom, baseline (all text lines of cells in same row appear on the same baseline declared in one of them)
char attribute:
- specifies a single character that should be the axis for alignment; align attribute must be set to "char" value
charoff attribute:
- defines the offset to the first occurrence of the mentioned aligning character; align attribute must be set to "char" value and if char attribute is missing it should be horizontally shifted to the end
- direction of offset is determined by the dir attribute
span attribute:
- specifies the number of columns spanned by <col /> element
- must be set to more then "0" (default is "1")
- <col /> element attribute should override <column> element
rowspan attribute:
- number of rows spanned by the current cell
- default value is "1"; value of "0" means that the cell spans across all rows
colspan attribute:
- number of columns spanned by the current cell
- default value is "1"; value of "0" means that the cell spans across all columns
Example
HTML table styling attributes
Comments
No comments have been made yet.
Please login to leave a comment. Login now