Cellspacing and cellpadding usage, cellpadding
Usage of cellspacing and cellpadding:
These two are two important attributes of a table, and they are used when creating a thin-line table. Of course, there is not only one method for creating a thin-line table, the following describes the usage of these two attributes. Let's take a look at the code example:
<! DOCTYPE html>
The above Code demonstrates the role of the cellspacing and cellpadding attributes.
1. cellspacing attributes:
This attribute specifies the spacing between table cells and cells, as shown in the following figure:
The distance between two white cells and the table border is also cellspacing.
This attribute is similar to the css margin attribute.
2. cellpadding attributes:
This attribute is used to specify the distance between the content of a cell and the edge of the Cell, as shown in the following figure:
This attribute is similar to the padding attribute of css.
Original address: http://www.51texiao.cn/HTML5jiaocheng/2015/0521/2127.html