Adding a Border

A border helps distinguish your table from the rest of the page. However, if you’re laying out your page with tables, you may not want to call so much attention to the border.

Figure 16.7. In this example, we set a 10 pixel wide border for the outside of the table. When you set the border attribute, regardless of its value, the cell borders are always 1 pixel wide.

To create a border with (X)HTML:

1.
Inside the initial table tag, type border.
2.
If desired, type ="n", where n is the thickness in pixels of the border.
Figure 16.8. Although borders are not usually shown in tables used for layout, they are often temporarily ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.