HTML CSS JavaScript SEO Python Posts Privacy About Contact

CSS Tables

The look of an HTML table can be greatly improved with CSS.

The look of an HTML table can be greatly improved with CSS.

Table Borders

To specify table borders in CSS, use the border property.

Preview

Notice that the table in the example above has double borders. This is because both the table and the <th> and <td> elements have separate borders.

Collapse Table Borders

The border-collapse property sets whether the table borders should be collapsed into a single border.

Preview

Table Padding, Width, and Alignment

We can make tables look fantastic just by using padding, proper text alignment, and background colors on headings.

Preview