Please note, this is a STATIC archive of website technosmarter.com from July 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
 

HTML Cellpadding Attribute


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>
<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>
</html>
Run

Note- The table cellpadding is taken 30px.


Please Share

Recommended Posts:-