Table Backgrounds on HTML

Table Backgrounds:

• You can also set table background:
• bgcolor attribute-You can set Background colour for whole table or just for
one cell.
• background attribute-You can set Background image for whole table or just
for one cell.
• bordercolor attribute-You can also set border colour .
Example:

<!DOCTYPE html>
<html>
<head>
<title>HTML Table</title>
</head>
<body>
<table border=”1” bordercolor="green" bgcolor="red">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr>
<td rowspan="2">Row 1 cell 1</td>
<td>Row 1 cell 2</td>
<td>Row 1 cell 3</td>
</tr>
<tr>
<td>Row 2 cell 2</td>
<td>Row 2 cell 3</td>
</tr>
<tr>
<td colspan="3">Row 3 cell 1</td>
</tr>
</table>
</body>
</html>
OUTPUT:

Comments

Popular posts from this blog

Set Font Colour

HTML FONTS

Line Break Tag on HTML