Defines a table column group.
Platform Support
IE | Netscape | Mozilla | Opera | Safari | 4.0+ | 6.0+ | 1.0+ | 7.0+ | 1.0+ |
---|
Example
This example shows a table with the 10px-wide first column center-aligned and the second column left-aligned:
<table>
<colgroup>
<col align="center" width="10px" />
<col align="left" />
</colgroup>
<tr>
<td>1.</td> <td>Labrador retriever</td>
</tr>
<tr>
<td>2.</td> <td>Golden retriever</td>
</tr>
<tr>
<td>3.</td> <td>Pug</td>
</tr>
</table>
Remarks
Specify the attributes of any individual columns in a <col /> tag that is nested inside of a set of <colgroup> </colgroup> tags.
Attribute Detail
Attribute | IE | Netscape | Mozilla | Opera | Safari |
---|---|---|---|---|---|
Defines the alignment of the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Specifies the background color for the document or element. Specify either a color name or RGB color. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Specifies which character to use to set the alignment for the element. | 4.0+ | 1.0+ | 7.0+ | 1.0+ | |
Number of characters to offset the other column characters from the character specified by char. | 4.0+ | 1.0+ | 7.0+ | 1.0+ | |
CSS class assigned to the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Direction of the element text. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Unique identifier for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Language code for the content of the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Number of columns that this column should span. | 4.0+ | 6.0+ | 1.0+ | 7.0+ | 1.0+ |
Inline style for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Short text description for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Vertical alignment of the element. | 2.0+ | 1.1+ | 1.0+ | 4.0+ | 1.0+ |
Width of the element (pixels or percentage). | 2.0+ | 1.1+ | 1.0+ | 4.0+ | 1.0+ |
Event Detail
Event | IE | Netscape | Mozilla | Opera | Safari |
---|---|---|---|---|---|
Fires when the element is clicked. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when the element is double-clicked. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when a user presses down on a key while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when a user presses a key or holds down the key while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when a user releases a key while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when a user clicks down on the mouse button while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when the mouse moves while the pointer over the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when the mouse pointer moves off of the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when the mouse pointer moves over the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when the user releases the mouse button while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
Fires when the ready state of the element changes. | 4.0+ | no | no | no | no |
Availability
W3C HTML 4.01