赛派号

20款速腾和21款速腾对比 HTML Table Padding & Spacing

HTML Table Padding & Spacing ❮ Previous Next ❯

HTML tables can adjust the padding inside the cells, and also the space between the cells.

With Padding hello hello hello hello hello hello hello hello hello With Spacing hello hello hello hello hello hello hello hello hello HTML Table - Cell Padding

Cell padding is the space between the cell edges and the cell content.

By default the padding is set to 0.

To add padding on table cells, use the CSS padding property:

Example th, td {   padding: 15px; } Try it Yourself »

To add padding only above the content, use the padding-top property.

Add padding to the other sides with the padding-bottom, padding-left, and padding-right properties:

Example th, td {   padding-top: 10px;   padding-bottom: 20px;   padding-left: 30px;   padding-right: 40px; } Try it Yourself » HTML Table - Cell Spacing

Cell spacing is the space between each cell.

By default the space is set to 2 pixels.

To change the space between table cells, use the CSS border-spacing property on the table element:

Example table {   border-spacing: 30px; } Try it Yourself » ❮ Previous Next ❯ ★ +1   Track your progress - it's free!   Log in Sign Up

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lsinopec@gmail.com举报,一经查实,本站将立刻删除。

上一篇 没有了

下一篇没有了