This article mainly introduces the function instance of the CellSpacing property of the HTML Table tab, and parses the CellSpacing attribute property value and syntax specification about the HTML table label. Now let's take a look at this article.
Let's start by looking at the CellSpacing property of the HTML Table tab:
The CellSpacing property specifies the space between cells.
Note: Do not confuse this property with the CellPadding property, the cellpadding attribute specifies the space between the cell edge and the cell content.
Property value of the CellSpacing property:
Pixels: The space between the specified units.
Let's look at an example:
The following example sets the table cell spacing to 20 pixels:
<table border= "5" cellspacing= "> <tr> <th> header </th> <th> table 1</th > </tr> <tr> <td>topic.alibabacloud.com</td> <td>200</td > </tr></table>
I set the attribute value of cellspacing to 20 to see the effect:
This figure is very clear, but for better observation, let's take another example:
Now let's see what the effect is:
This effect is not obvious, the cell spacing is set to 20 pixels, the width is also widened a lot, so look very clear.
Summary of cellspacing properties for HTML table labels:
The cellspacing attribute usage in this table tab is used in this way, and when we use the table to make it look good, we need to get the cellspacing property, which fills the inner box much better than anything else. Although the current HTML5 does not support this property, but in the daily is not HTML, the individual still prefer this attribute.
Okay, here's the end of this article (to learn more welcome to topic.alibabacloud.com, here's a free online tutorial on any programming language you want to learn.) ), there is a problem can leave a message below.