tag < table > :
Definition and Usage
The <table> tag defines an HTML table.
An HTML table consists of the <table> element and one or more <tr>, <th>, and <td> elements.
The <tr> element defines a table row, the <th> element defines a table header, and the <td> element defines a table cell.
A more complex HTML table may also include <caption>, <col>, <colgroup>, <thead>, <tfoot>, and <tbody> elements.
| example | |||||||||||||
|
< table cellpadding ="5" cellspacing ="0" style ="border
:solid 2px blue; width:100%" >
< tr > < td class ="header" colspan ="2" > Header < /td > < /tr > < tr > < td class ="body" > Body 1 < /td > < td class="body" > Body 2 < /td > < /tr > < tr > < td class ="body" colspan ="2" style ="padding :0" > < table cellpadding ="5" cellspacing="0" style ="width :100% " > < tr > < td style ="border :solid 1px green " > C1 < /td > < td style ="border :solid 1px green " > C2 < /td > < td style ="border :solid 1px green " > C3 < /td > < /tr > < tr > < td style ="border :solid 1px green " > C4 < /td > < td style ="border :solid 1px green " > C5 < /td > < td style ="border :solid 1px green " > C6 < /td > < /tr > < /table > < /td > < /tr > < /table > |
code | ||||||||||||
|
output | ||||||||||||