CBSE Class 10 Computer Applications Question 107 of 125

HTML II — Images, Links and Tables — Question 21

Back to all questions
21
Question

Question 21

How is spacing in cells of table controlled ?

Answer

To control the spacing of cells, the 'Cellspacing' and 'Cellpadding' attributes are used.

  1. Cellspacing — It gives the amount of space between cells.
  2. 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>