/

HTML / CSS / JavaScript Tutorial

HTML Element: <colgroup>

[this page | pdf | back links]

The HTML <colgroup> element specifies a group of one or more columns in a table. It can be used to apply styles to entire columns in a table. It must be a child of a <table> element, positioned after any <caption> elements and before any <tbody>, <tfoot>, <thead> and <tr> elements. If you want to define different styles to column within the column group then use the <col> element.

 

The attributes it can take (other than HTML global attributes and HTML event attributes) include:

 

Attribute

Description

More

span

Number of columns to span

Here

 

To create or access such an element in JavaScript see here. The corresponding HTML DOM object supports standard DOM properties and methods, and additional properties with the same name and meaning as the attributes of the underlying HTML element referred to above. The default style applicable to this element is shown here.

 


NAVIGATION LINKS
Contents | Prev | Next | HTML Elements


Desktop view | Switch to Mobile