What is the CellSpacing property of the table label? An article that lets you understand the CellSpacing property

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.