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 explanation of how to use join to optimize SQL in MySQL

0. Prepare relevant tables for the following test...

Small program to implement a simple calculator

This article example shares the specific code of ...

SQL statements in Mysql do not use indexes

MySQL query not using index aggregation As we all...

Detailed explanation of JavaScript array deduplication

Table of contents 1. Array deduplication 2. Dedup...

Summary of some HTML code writing style suggestions

Omit the protocol of the resource file It is reco...

How to run multiple MySQL instances in Windows

Preface In Windows, you can start multiple MySQL ...

Vue implements simple comment function

This article shares the specific code of Vue to i...

MySQL-8.0.26 Configuration Graphics Tutorial

Preface: Recently, the company project changed th...

Detailed explanation of docker-machine usage

Docker-machine is a Docker management tool offici...

Explanation of the basic syntax of Mysql database stored procedures

drop procedure sp_name// Before this, I have told...

Summary of several principles that should be followed in HTML page output

1. DOCTYPE is indispensable. The browser determin...

How to use Cron Jobs to execute PHP regularly under Cpanel

Open the cpanel management backend, under the &qu...

Analysis of the cause of docker error Exited (1) 4 minutes ago

Docker error 1. Check the cause docker logs nexus...