How to set tables cellpadding and cellspacing in CSS
Editor to share with you how to set up tables cellpadding and cellspacing in CSS, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Answer: use the CSSpadding and border-spacing properties
It is well known that the table cellpadding and cellspacing properties have been removed from HTML5.
However, you can still easily set padding in a table cell using the CSSpadding property. This is an effective way to produce the same effect as the table cellpadding property.
The style rule in the following example adds 10 pixel fills to the table cell.
Try this code for example »
Set Cellpadding in CSS
Table, th, td {
Border: 1px solid # 666
}
Table th, table td {
Padding: 10px; / * Apply cell padding * /
}
The above is all the contents of the article "how to set up tables cellpadding and cellspacing in CSS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!