Description and use of table attributes CellPad, CellSpace and Border in web page production

Description and use of table attributes CellPad, CellSpace and Border in web page production
cellspacing is the distance between cells in the table;
Cellpadding is the blank space within a cell in a table;
Commonly known as external patches and internal patches, similar to margin and padding applied to div and span
You can try it out by adding borders to the cells and changing the values ​​of cellpadding and cellspacing to see what happens.
For example :

Copy code
The code is as follows:

<table>
<tr>
<td style="cellspacing:10px;cellpadding:10px;border:1px solid #CCCCCC;">
</td>
<td style="cellspacing:10px;cellpadding:20px;border:1px solid #CCCCCC;">
</td>
</tr>
</table>

This means that there is a 10 pixel patch (cellspacing) between the border of the td and the edge of the table, and a 20 pixel patch (cellpadding) between the border of the td and the inner elements of the td.

For more table properties, please refer to :
Property ______________Description
width______________The width of the table
height_____________The height of the table
align______________The horizontal position of the table on the page
background_________ The background image of the table
bgcolor____________The background color of the table
border_____________Width of the table border in pixels
bordercolor________ table border color
bordercolorlight_____The color of the bright part of the table border
bordercolordark____The color of the dark part of the table border
cellspacing________the spacing between cells
cellpadding________The amount of space between the cell content and the cell border

<<:  Interpretation of 17 advertising effectiveness measures

>>:  Basic operations on invisible columns in MySQL 8.0

Recommend

Detailed installation process and basic usage of MySQL under Windows

Table of contents 1. Download MySQL 2. Install My...

mysql 5.7.11 winx64 initial password change

Download the compressed version of MySQL-5.7.11-w...

abbr mark and acronym mark

The <abbr> and <acronym> tags represen...

Several ways to center a box in Web development

1. Record several methods of centering the box: 1...

Detailed steps for installing Tomcat, MySQL and Redis with Docker

Table of contents Install Tomcat with Docker Use ...

Example of how to set up a third-level domain name in nginx

Problem Description By configuring nginx, you can...

Detailed explanation of the execution process of JavaScript engine V8

Table of contents 1. V8 Source 2. V8 Service Targ...

Installation and configuration method of vue-route routing management

introduce Vue Router is the official routing mana...

React Fragment Introduction and Detailed Usage

Table of contents Preface Motivation for Fragment...

Use of TypeScript Generics

Table of contents 1. Easy to use 2. Using generic...

Detailed explanation of CSS elastic box flex-grow, flex-shrink, flex-basis

The functions of the three attributes flex-grow, ...

Mybatis mysql delete in operation can only delete the first data method

Bugs As shown in the figure, I started to copy th...

XHTML Basic 1.1, a mobile web markup language recommended by W3C

W3C recently released two standards, namely "...