Search This Blog

CSS Table With Background Color Example

CSS Table With Background Color Example :
<!DOCTYPE html>
<html>
<head>
<title> kod4u </title>
<style type="text/css">
table, td{
border: 1px solid;
}

th{
background-color: orange;
color: white;
}
</style>
</head>
<body>
<h1> Table With Background Color Example </h1>
<p> Here we use background color property in table header </p>
<table>
<tr>
<th> First Name </th>
<th> Last Name </th>
<th> Roll No </th>
</tr>

<tr>
<td> Mohan </td>
<td> Rana </td>
<td> 17056 </td>
</tr>

<tr>
<td> Ankit </td>
<td> Jems </td>
<td> 15071 </td>
</tr>

<tr>
<td> Amit </td>
<td> SIngh </td>
<td> 16002 </td>
</tr>

</table>
</body>
</html>
OUTPUT
CSS Table With Background Color Example

No comments:

Post a Comment