Cellspacing and cellpadding usage, cellpadding

Source: Internet
Author: User

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

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.