Table Height & width on HTML

Table Height & width:

• You can set the table height & width using height and width attributes.
• You can specify the size in the form of pixels or percentage.
Example:

<!DOCTYPE html>
<html>
<head>
<title>HTML Table</title>
</head>
<body>
<table border="1" width="300" height="50">
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>
</body>
</html>
OUTPUT:

Comments

Popular posts from this blog

Set Font Colour

HTML ORDERED LISTS

Colspan & Rowspan Attributes on HTML Table