Tables

Tables are created using the <table> element and contain table rows defined with the <tr> element that contain table cells defined by the <td> (table data) element.

 

Table column headings are defined using the <th> element, which will provide bold headings for each column.

 

A separate table heading can be defined using the <thead> element.

Table body is defined using the <tbody> element.

Table footer is defined using the <tfoot> element.

 

Attribute Description Value
border Specifies URL for image 0, 1, 2, etc
bordercolor Specifies a colour for the border User defined colour
bgcolor Specifies a colour for the background User defined colour
background Specifies URL for background image “https://www.site.com/background.png” or relative URL “/images/background.png”
width Specifies the width User defined number of pixels, e.g. 400px, or % screen e.g. 50%
height Specifies the height User defined number of pixels, e.g. 400px, or % screen e.g. 50%
cellpadding Specifies padding within cells from content to border User defined number of pixels, e.g. 10px
cellspacing Specifies distance between cells User defined number of pixels, e.g. 20px
colspan Specifies the number of columns a cell should span User defined column number, e.g. 3
rowspan Specifies the number of rows a cell should span User defined row number, e.g. 5

 

Leave a Reply