The document discusses HTML table elements like <table>, <th>, <td>, and <tr> that define the structure and layout of a table. It also covers CSS properties that can be used to style tables, including border-collapse to merge cell borders, padding to space content from borders, and colspan and rowspan to combine table cells. The <caption> element is used to add a title to the table.
The document discusses HTML table elements like <table>, <th>, <td>, and <tr> that define the structure and layout of a table. It also covers CSS properties that can be used to style tables, including border-collapse to merge cell borders, padding to space content from borders, and colspan and rowspan to combine table cells. The <caption> element is used to add a title to the table.
- <th>: data header of the table (table cells) - <td>: data container of the table (table cells) Note: <td> can contain text, image, list, other tables. etc. Note: Remember to define borders for both the table and the table cells. - border-collapse: to make border collapse into other borders border-collapse: collapse; - padding: to add space between the cell container and its border. - border-spacing: to specified the space between the cells Note: If the table has collapsed borders, border-spacing has no effect. - colspan: to create more than one cell columns - rowspan: more than one cell rows - caption: Note: The <caption> tag must be inserted immediately after the <table> tag. - <div>: to define a special style for a special table, add an id attribute to the table