Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

col

The <col> element lends characteristics to a table column.

Code Example

<table border="1"> <colgroup> <col span="2" style="background-color:#FFF8DD;"> <col style="background-color:#CCE6FF;"> <col style="background-color:#FFB3B3;"> </colgroup> <tr> <th>John</th> <th>Bob</th> <th>Susan</th> </tr> <tr> <td>555-5555</td> <td>888-8888</td> <td>222-2222</td> </tr> <tr> <td>Male</td> <td>Male</td> <td>Female</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-col-element

HTML

Elements

aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr