Home >>
HTML 5 >> What is Table Colgroup in HTML 5
What is Table Colgroup in HTML 5
HTML Table Colgroup element is used to style specific columns of a table.
Example
<!Doctype Html>
<html>
<head>
<title>HTML table Colgroup</title>
<style>
table, th, td {
border: 1px solid #FFF;
}
</style>
</head>
<body>
<table width="200" height="200" border="1">
<colgroup>
<col span="2" style="background-color: #000">
</colgroup>
<tr>
<td>A</th>
<td>B</th>
<td>C</th>
</tr>
<tr>
<td>C</td>
<td>D</td>
<td>E</td>
</tr>
</table>
</body>
</html>
Post Your Comment