Share this Page URL

Controlling Margins, Padding, and Borders > Using the DIV Element - Pg. 161

158 Learn HTML 4 In a Weekend cellspacing= "6" cellpadding= "6" Figure 5.6 Spacing is added between the cells and padding within the cells. <table border="6" cellspacing="6" cellpadding="6"> <tr><th></th> <th>Jan</th> <th>Feb</th> <th>Mar</th> <th>Totals</th></tr> Centering the Table Use the ALIGN attribute to center the TABLE element (see Figure 5.8): <table align="center" border="6" cellspacing="6" cell- padding="6"> Column headings Figure 5.7 Table headings are automatically bolded and centered.