This Blog is for HTML Tutorials.

HTML Logo

HTML Table "Spacing within Cells"

The cellpadding attribute of the table element specifies the border width of a table.

 <Table cellspadding = "3">



Cellpadding


Example - 

When cellpadding is 0

  
<table border = "1" cellpadding = "0">
<tr>
        <td>Cell A</td>
        <td>Cell B</td>
        <td>Cell C</td> 
</tr> 
</table> 


Output

Cellpadding2

When cellpadding is 5

  
<table border = "1" cellpadding = "5">
<tr>
        <td>Cell A</td>
        <td>Cell B</td>
        <td>Cell C</td> 
</tr> 
</table> 


Output

cellpadding

 

When cellpadding is 15

  
<table border = "1" cellpadding = "15">
<tr>
        <td>Cell A</td>
        <td>Cell B</td>
        <td>Cell C</td> 
</tr> 
</table> 


Output

Cellpadding4

 

Post a Comment

0 Comments