Tables
The <table> element represents a two-dimensional table. Other main elements thats related with table:
- <tr> - row a table
- <th> - header cell
- <td> - ordinary cell
code | result | ||||
---|---|---|---|---|---|
|
|
cells
Cells define by <th> and <td> elements. First for headers, second for data.
attibute | description |
---|---|
rowspan |
A non-negative integer value that indicates for how many rows the cell extends. Default value is 1. 0 extends until the end of the table section, that the cell belongs to. Maximum value is 65534 |
colspan |
A non-negative integer value that indicates for how many columns the cell extends. Default value is 1. Values higher than 1000 will be considered as incorrect and will be set to the default value |
scope |
Used with <th> element. Possible values:
|
sections
Sections provide information, that can be used for rendering table on screen or for printing.
Browsers can use these elements to enable scrolling of the table body independently of the header and footer. Or printing header and footer at the top and bottom of each page.
You must use the elements in the same order or skip the element:
- <caption> defines a caption of table
- <colgroup> defines a group of columns within a table
- <thead> defines a set of rows defining the head of the table
- <tbody> defines main content of table
- <tfoot> defines a footer content of table
code | result | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|