[Back] [Next] The Information Commons
.................... Introduction to HTML

4.10.2 Netscape TABLE Attribute Extensions

Netscape Navigator supports several attribute extensions. With Netscape you can assign a number to BORDER to specify the width, in pixels, of the outside table border. You can also assign numbers to the CELLPADDING and CELLSPACING attributes. CELLPADDING defines the space, in pixels, between the cell contents and the cell borders, while CELLSPACING defines the space between the cells (the width of the borders).

Finally, the WIDTH attribute sets the width of the entire table. This can be expressed as an absolute number (in pixels) or as a percentage width of the entire display.

Simple Table Examples

Here are some simple tables, showing how the Netscape Navigator-specific WIDTH, CELLSPACING, CELLPADDING and BORDER attributes work:


<table border>
<TR> <TH> Head 1 <TH> Head 2 </TR>
<TR> <TD> 4.11   <TD> 4.23   </TR>
</table>

Head 1 Head 2
4.11 4.23
<table border=8>
<TR> <TH> Head 1 <TH> Head 2 </TR>
<TR> <TD> 4.11   <TD> 4.23   </TR>
</table>

Head 1 Head 2
4.11 4.23
<table border cellpadding=8>
<TR> <TH> Head 1 <TH> Head 2 </TR>
<TR> <TD> 4.11   <TD> 4.23   </TR>
</table>

Head 1 Head 2
4.11 4.23
<table border cellspacing=8>
<TR> <TH> Head 1 <TH> Head 2 </TR>
<TR> <TD> 4.11   <TD> 4.23   </TR>
</table>

Head 1 Head 2
4.11 4.23
<table border width=80%>
<TR> <TH> Head 1 <TH> Head 2 </TR>
<TR> <TD> 4.11   <TD> 4.23   </TR>
</table>
Head 1 Head 2
4.11 4.23

<table border width=80>
<TR> <TH> Head 1 <TH> Head 2 </TR>
<TR> <TD> 4.11   <TD> 4.23   </TR>
</table>
Head 1 Head 2
4.11 4.23

[Back] [Next] .................... Introduction to HTML

Page Last Updated: 4 December 1995