HTML Cellpadding Attribute

Techno HTML5

The cellpadding attribute specifies the inner space of cells.
We define the cellpadding for cells by the pixels like 20px,30px ,100px or so on .

In simple words cellpadding increase and decrease the size of all cells.
Let's see with an example.

HTML Cellpadding


<!DOCTYPE>
<html>
<head>
<title>HTML Table </title>
</head>
<body>
<table height="150" width="500" border="1"cellspacing="10px"cellpadding="30px">  
<tr> 
<td> 
Employee Name
</td> 
<td> 
Ramesh 
</td> 
<td> 
Vikash
</td> <td> 
Sheema 
</td> 
</tr> 
<tr> 
<td> 
Salary
</td> 
<td> 
10000
</td> 
<td> 
15000
</td> <td> 
20000
</td>  
</tr> 
</table>
</body>
</head>
</html>
Run

Note- The table cellpadding is taken 30px.