background color program
CSS programe
1] background color program
<!doctype html>
<html>
<body>
<h1 style="background-color:rgb(255, 99, 71);">css apply </h1>
<h1 style="background-color:#ff6347;">css apply</h1>
<h1 style="background-color:hsl(9, 100%, 64%);">css apply </h1>
<h1 style="background-color:rgba(255, 99, 71, 0.5);">css apply </h1>
<h1 style="background-color:hsla(9, 100%, 64%, 0.5);">css apply </h1>
<h1 style="background-color:rgba(600,105,80,0.6);">css apply</h1>
</body>
</html>
Output
2] Table apply css
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th:nth-child(even),td:nth-child(even) {
background-color: pink;
}
</style>
</head>
<body>
<h2>Striped Table</h2>
<p>For zebra-striped tables, use the nth-child()
selector and add a background-color to all even (or odd) table rows:</p>
<table style="width:100%">
<tr>
<th>First Name</th>
<th>Middle Name</th>
<th>Last Name</th>
<th>Marks</th>
<th>Grade</th>
<th>Percentage</th>
<th>Remark</th>
</tr>
<tr>
td> aishwarya</td>
<td> sanjay </td>
<td> jadha</td>
<td>80 </td>
<td> A</td>
<td> 70%</td>
<td>No </td>
</tr>
<tr>
</Head>
</Body>
</html>
Related Post
Post a Comment