Home > DeveloperSection > Interviews > How to use Cellpadding and Cellspacing Attributes in HTML code.?

Posted on    October-12-2016 4:30 AM

 HTML HTML 
Ratings:
 1 Answer(s)
  82  View(s)
Rate this:

Ailsa Singh
Ailsa Singh

Total Post:7

Points:35
Posted on    October-12-2016 4:30 AM

Cellpadding and Cellspacing Attributes in HTML code.

It is used to adjust the spaces of the table.

CellSpacing : It is used to define the width of the border

CellPadding : it is used to define the distance between the border and content within the cell

<!DOCTYPE html>

<html>                  

<body>

<table border="1" cellpadding="50" cellspacing="50">

<tr>

<th>Name</th>

<th>Post</th>

</tr>

<tr>

<td>Abhishek</td>

<td>Software Developer</td>

</tr>

<tr>

<td>Pri</td>

<td>Programmer</td>

</tr>

</table>

</body>

</html>


Modified On Oct-12-2016 04:31:36 AM

Don't want to miss updates? Please click the below button!

Follow MindStick