Controlling
Space in and Around Cells:
TABLE with default cellpadding
and cellspacing:
•you control
spacing between cells with the cellspacing attribute in the <table> tag:
<table cellspacing="6">
•you control
spacing around cells with the cellpadding attribute in the <table> tag:
<table cellpadding="6">
•you can use
both, or you don't have to set it. The defaults are CELLSPACE=2 pixels, cellpadding=1
pixel. If you don't want any spacing set them to 0 pixels.
•Make sure your border attribute is set to 0 pixels if you don't
want a border. This also gives you a little extra space.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>table</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="75%"
border="1" cellspacing="6" cellpadding="6">
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
</table>
</body>
</html>