Sunday, July 14, 2013

Html cellpadding use

<html>
<body>

<h4>Without cellpadding:</h4>
<table border="1">
<tr>
  <td>First</td>
  <td>Row</td>
</tr>  
<tr>
  <td>Second</td>
  <td>Row</td>
</tr>
</table>

<h4>With cellpadding:</h4>
<table border="1"
cellpadding="10">
<tr>
  <td>First</td>
  <td>Row</td>
</tr>  
<tr>
  <td>Second</td>
  <td>Row</td>
</tr>
</table>

</body>
</html>

Result:

Without cellpadding:

First Row
Second Row

With cellpadding:

First Row
Second Row

No comments: