Share this Page URL

Creating a Three-Column Page Layout > Varying the Cell Padding Amount - Pg. 177

174 Learn HTML 4 In a Weekend Displaying Backgrounds behind Tables You can display a background color or background image behind a table for a more dramatic effect. Displaying a Background Color behind the Table You can use the BGCOLOR attribute to set a background color behind the table. Set a light blue background color behind the whole table (see Figure 5.21): <table bgcolor="#ccffff" align="center" border="6" cellspac- ing="6" cellpadding="6" width="636"> All current browsers display the background color behind the entire table body, as in Figure 5.21. Earlier browsers can vary, however, in how they display a background behind a whole table. Internet Explorer 4 also dis- plays the background color behind the table caption. Netscape 4 only dis- plays the background color behind the table's cells, but not behind the spacing between the cells. bgcolor= "#ccffff" (light blue) Figure 5.21 A light blue background color is displayed behind the whole table.