0% found this document useful (0 votes)
27 views

HTML Table: HTML: (,, , ), CSS (Padding, Border-Collapse, Border-Spacing, Colspan

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.

Uploaded by

Vannak2015
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

HTML Table: HTML: (,, , ), CSS (Padding, Border-Collapse, Border-Spacing, Colspan

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.

Uploaded by

Vannak2015
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

HTML Table: HTML: [<table>, <th>, <td>, <tr>], CSS [padding, border-collapse, border-spacing, colspan,

rowspan, caption]

- <table>: contain all data inside 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

You might also like