What is HTML Table Cellpadding Attribute? Learn with Examples
What is HTML Table Cellpadding Attribute
Cellpadding set the amount of space between the contents of call and the cell boundary or edge. The default is 1. Cellpadding is an attribute of an. Individual cell in a table, so each cell ina table can have .the its own Cellpadding value.
Syntax
What is HTML Table Cellpadding Attribute
Program
What is HTML Table Cellpadding Attribute
Explain Program
<!DOCTYPE html>
- Declares the document type.
<html>...</html>
- The root element that wraps all content of the webpage.
<body>...</body>
- Contains everything visible to the user on the web page.
Step 4 ]
<P>Table without Cellpadding </p>
Displays a paragraph with the text Table
without Cellpadding
<table border = 1>
Starts a table with a border of 1 pixel.
<tr>
<th>month</th>
<th>saving</th>
</tr>
This is the header row of the table.
Step 7 ]
<tr>
<td>January</td>
<td>$100</td>
</tr>
This is the data row with:
Step 8 ]
</table>
Closes the table.
</head>
</body>
</html>
Properly closes the ,<head> ,<body> and <html>
tags.
What is HTML Table Cellpadding
output

Post a Comment