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

WBOY
Release: 2016-05-16 16:40:46
Original
2124 people have browsed it

cellspacing is the distance between cells in the table;
cellpadding is the blank part within the cells in the table;
commonly known as outer patch and inner patch, similar to margin and padding applied to divs and spans
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:










That is to say: there is 10 between the border of td and the edge of table A patch of 20 pixels (cellspacing), the border of td and the inner element of td have a patch of 20 pixels (cellpadding).

For more table attributes, please refer to :
Attribute_ ______________ 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 of the table Color
border_____________The 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 size of the blank distance between the cell content and the cell border
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!