Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

colgroup

The <colgroup> element represents a group of columns in a table.

Code Example

<table border="1"> <colgroup span="3" style="background: #8CC6FF;"></colgroup> <tr> <th>January</th> <th>February</th> <th>March</th> <th>April</th> </tr> <tr> <td>50</td> <td>36</td> <td>44</td> <td>25</td> </tr> </table> open in code editor

Attributes

globals - the global attributes common to all elements possible values: see global attribute list span - specify how many columns to span possible values: "integer"

Official Documentation

http://www.w3.org/TR/html/tabular-data.html#the-colgroup-element

HTML

Elements

aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr