Full width home advertisement

How To

Science

Post Page Advertisement [Top]


How to use Cellpadding and Cellspacing Attributes

Cellpadding and cellspacing are attributes which are used to adjust the white space in your table cells to a larger size or small size. 


The cellspacing attribute specifies the width of the border. The cellpadding attribute is for the distance between cell borders and the content within the cell.

Example


<!DOCTYPE html>

<html>

<head>

<title>Scholars Table Cellpadding</title>

</head>

<body>

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

<tr>

<th>Name</th>

<th>Age</th>

</tr>

<tr>

<td>James Rome</td>

<td>65</td>

</tr>

<tr>

<td>Daniel Lee</td>

<td>60</td>

</tr>

</table>

</body>

</html>

See Result:

Name
Age
James Rome
65
Daniel Lee
60

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib