HTML table cellspacing attribute
The function of the HTML Table cellspacing attribute is used to design the "distance between fields" in the table . It is often confused with cellpadding . When we use cellspacing to increase the distance of the table fields, it will feel as if the box lines of the table have changed. It’s thick, it’s actually due to the visual effect caused by the increased distance between the fields. The default distance between the fields of the HTML table is not obvious. If the table border is set to 0 and the cellpadding is also set to 0, it is almost You can't feel the distance between the table fields, it is easy to stick together, but if you make good use of the effects of the cellspacing property, combined with the border and cellpadding properties, you can solve this problem.
HTML Table cellspacing attribute basic syntax
Note, the cellspacing property will also increase the distance between the table column and the table border .
HTML Table cellspacing attribute example
<table border="1">
<tr><td>This is the test field content</td><td>This is the test field content</td></tr>
</table >
Forms that have used cellspacing
<table cellspacing="8" border="1">
<tr><td>This is the test field content</td><td>This is the test field content</td></ tr>
</table>
This is the test field content | This is the test field content |
Forms that have used cellspacing
This is the test field content | This is the test field content |
- HTML Table table background color
- HTML Table table border color and style design
CSS border-spacing can achieve more advanced effects than cellspacing, please refer to: CSS border-spacing property .
Post a Comment
0 Comments