HTML and CSS Reference
In-Depth Information
Adding a Table Border Using HTML
• To add a border to a Web table using HTML, use the border attribute
<table border=” value ”> ... </table>
where value is the size of the border in pixels.
You decide to add a 1-pixel border to the schedule table. As a result of the addition of
the border, browsers also will insert gridlines around each of the table cells.
To add a border to the schedule:
1. Return to the schedule.htm file in your text editor and add the attribute
border=”1”
to the table element as shown in Figure 5-8.
Figure 5-8
Adding a table border
table cells will be
surrounded by a
1-pixel-wide border
2. Save your changes to the file, and then reload the schedule.htm file in your Web
browser. Figure 5-9 shows the revised table with the added border and internal
gridlines.
Figure 5-9
Web table borders and cell gridlines
Search WWH ::




Custom Search