Share this Page URL

Chapter 10. Table Talk: Adding Tables to... > Table Refinishing—More Table Tidbits - Pg. 115

Table Talk: Adding Tables to Your Page 115 · The amount of space between cells.By default, browsers allow just two pixels of space between each cell (vertically and horizontally). To bump that up, use the CELLSPACING attribute for the <TABLE> tag. Here's an example that increases the cell spacing to 10: <TABLE CELLSPACING="10"> · The amount of space between a cell's contents and its border.Browsers like to cram data into a cell as tightly as possible. To that end, they leave a mere one pixel of space between the contents of the cell and the cell border. (This space is called the cell padding. ) To give your table data more room to breathe, use the <TABLE> tag's CELLPADDING attribute. For example, the following line tells the browser to reserve a full 10 pixels of padding above, below, left, and right of the content in each cell: <TABLE CELLPADDING="10"> Here's a web page that shows you a for-instance for most of these attributes (see tblattr.htm on this book's CD): <HTML> <HEAD> <TITLE>Some Table Extensions</TITLE> </HEAD> <BODY> <B>&lt;TABLE BGCOLOR="#CCCCCC"&gt;</B> <TABLE BORDER="1" BGCOLOR="#CCCCCC"> <TR> <TD>Dumb</TD> <TD>Dumber</TD> <TD>Dumbest</TD> </TR> </TABLE>