Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

table

The <table> element is used to construct tables for displaying tabular content.

Code Example

<html> <head> <style> #myTable {background:#C0D080; border:#6B8336 5px solid; padding:20px; border-spacing:10px;} #myTable tr{background:#FFF1BF;} #myTable td{padding:12px; border:#000 2px dashed;} </style> </head> <body> <table id="myTable"> <tr> <td>Cell 1</td> <td>Cell 2</td> </tr> <tr> <td>Cell 3</td> <td>Cell 4</td> </tr> </table> </body> </html> open in code editor

Attributes

globals - the global attributes common to all elements possible values: see global attribute list border - specify that the table show the grid like border on all cells possible values: "integer" sortable - specify that the table has a sorting interface enabled possible values: value not required

Official Documentation

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

HTML

Elements

aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr