Change Language


Follow Navioo On Twitter

colgroup

Defines a table column group.

Browser/User Agent 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+
 
bgcolor
[color | "transparent"]. Example values: Red, #FF0000 (#RRGGBB color code for "red"), etc.
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+
 
char
[character]. Example values: ".", "*", etc.
Specifies which character to use to set the alignment for the element.
4.0+ 1.0+ 7.0+ 1.0+
 
charoff
[number-of-characters]. Example values: 2, -2, etc.
Number of characters to offset the other column characters from the character specified by char.
4.0+ 1.0+ 7.0+ 1.0+
 
class
[class-name]. Example values: header-class, list-element, etc.
CSS class assigned to the element.
2.0+ 1.0+ 1.0+ 4.0+ 1.0+
 
dir
Direction of the element text.
2.0+ 1.0+ 1.0+ 4.0+ 1.0+
 
id
[element-id]
Unique identifier for the element.
2.0+ 1.0+ 1.0+ 4.0+ 1.0+
 
lang
[language-code]. Example values: "en" (English), "fr" (French), "es" (Spanish), etc.
Language code for the content of the element.
2.0+ 1.0+ 1.0+ 4.0+ 1.0+
 
span
[number-of-columns]
Number of columns that this column should span.
4.0+ 6.0+ 1.0+ 7.0+ 1.0+
 
style
[style-name]
Inline style for the element.
2.0+ 1.0+ 1.0+ 4.0+ 1.0+
 
title
[text-description]
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
[number-of-pixels | percentage]. Example values: 200px, 15%, etc.
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
 

Ajax Javascript feed

↑ Grab this Headline Animator