Loading lesson path
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
Formula
HTML Table - Cell PaddingCell 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;
}Formula
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;
}Formula
HTML Table - Cell SpacingCell 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
Formula
border - spacing property on the table element:{Formula
border - spacing:30px;
}