Computer Applications
How is spacing in cells of table controlled ?
HTML Advanced Features
7 Likes
Answer
To control the spacing of cells, the 'Cellspacing' and 'Cellpadding' attributes are used.
- Cellspacing — It gives the amount of space between cells.
- Cellpadding — It gives the amount of space between the cell border and the cell contents.
Consider the following example:
<TABLE BORDER = "3" CELLSPACING = "1" CELLPADDING = "1">
<TR> <TD> Fruits </TD> <TD> Vegetables </TD> </TR>
<TR> <TD> Mango, Apple, Banana </TD> <TD> Potato, Aubergine, Gourd </TD> </TR>
</TABLE>
Answered By
5 Likes