HTML table spacing and border properties

Table and border attributes

(composition):
<td> refers to
table header is defined with the <th> tag. Most browsers will display the header as bold centered text

(border property): If the border property is not specified, the table will not display a border. Sometimes this is useful, but most of the time we want to show the border. To display a table with a border, use the border property.

(cell spacing and table content inner border):
cellspacing property to increase/decrease cell spacing.
The cellpadding property leaves more/less whitespace between the table content and the border.

(table height): style="height: 15%" is equivalent to height=15%"

(text alignment):
The align attribute specifies the alignment of the text in the paragraph.
Example: <p align="right">This is some text in a very short paragraph</p> The
        paragraph text is center-aligned when
used in a table with
<tr align="center">
                        <td>category</td>
                        <td>name</td>
</tr>


Sets whether the borders of the table are merged into a single border, and if so, the borders will be merged into a single border. border-spacing is ignored.

(table tag):
<table>------- table
<th>------------ table header
<tr> -------------- - row
<td>--------------cell
<caption>------ title
<colgroup> ------------- table column group
<col >-------------Properties of Table Columns
<thead>-------------Header
<tbody>------- ---body
<tfoot>---------------- footer

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326803802&siteId=291194637