January 2018
Intermediate to advanced
678 pages
20h 16m
English
In this section, we’ll describe how to format data tables in terms of their borders, cell alignment, and cell padding. Before HTML5, older versions of HTML allowed you to specify those presentation features using HTML attributes. But in sticking to its goal of keeping content and presentation separate, HTML5 has made those attributes obsolete. The solution? As usual, you should use CSS for presentation.
To specify whether or not you want borders for a table, you should use CSS’s border-style property. To specify the border’s width, you should use CSS’s border-width property. For example, here’s the CSS type selector rule used in the Wind Disasters web page:
table, th, td {border: ...Read now
Unlock full access