Key Points
To apply a simple default border to a table, include the
border="1"argument in the table’s opening tag. A value greater than 1 increases the table border but not the cell borders.The
frameargument specifies which sides of the table frame display the border; therulesargument specifies which sides of the cell borders display the border.For maximum flexibility, specify borders by using style sheets. Border style arguments in tables are the same as border style arguments around paragraphs:
border-width,border-color, andborder-style.To format one side of a border individually, specify the side in your argument:
border-top-width,border-bottom-style, and so on.You can apply a background color by using the
style="background-color: color" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access