Home | Computer Science

<
Table Attributes


Defination

Table attributes in HTML are used to customize table.


TABLE ATTRIBUTES
There are mainly four attributes of Table.
  1. Rowspan
    • The rowspan attribute specifies the number of rows a cell should span.
  2. Colspan
    • The colspan attribute defines the number of columns a cell should span.
  3. Cell Padding
    • Cell padding is the space between the cell edges and the cell content.
  4. Cell Spacing
    • Cell spacing refers to the amount of space that is held between the cells in a table.

Syntax of it is
<table .....="10">
In the place of dots you can put here any attribute.
</table>
Program
INPUT

<html> <body> <table border="2" cellspacing="10" cellpadding="40"> <tr> <th> Institute Name </th> <th> District </th> </tr> </table> </body> </html>

OUTPUT