You are on page 1of 2

<html>

<head>
<style>
.myDiv {
border: 5px outset maroon;
background-color: grey;
margin-top: 80px;
padding: 8px;
text-align: center;}
table,th,td
{
border:2px solid green;
}
table {
border-collapse:collapse;
width: 100%;
}

th, td {
text-align: left;
padding: 8px;
}
td:nth-child(3)
{
background-color: orange;
}
tr:nth-child(2) {background-color: yellow;}
tr:nth-child(3){ border:solid 1px lightblue;}
tr:nth-child(1){border:solid 7px;
border-top-color:red;
border-right-color:lightblue;
border-bottom-color:lavender;
border-left-color:black; }
.dashed { border:dashed 5px red;}
.dotted td;
</style>

</head>

<body>
<table>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>salary</th>
</tr>
<tr>
<td>sham</td>
<td>kumar</td>
<td>$1000</td>
</tr>
<tr>
<td>Priya</td>
<td>yadav</td>
<td>$1500</td>
</tr>
<tr>
<td>John</td>
<td>Smith</td>
<td>$3000</td>
</tr>

</table>
<div class="mydiv">
<h1 style="color:maroon;">Styling Table</h1>
<p style="color: lavender;">The above Employee table gives the information of
employer's full name with their salary</p></div>
</body>
</html>

You might also like