Task:
Design a web page that changes text color on hover.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Change Background Colors</title>
<style>
.txt-red:hover{
color: red;
}
.txt-green:hover{
color: green;
}
.txt-blue:hover{
color: blue;
}
</style>
</head>
<body>
<p>Place your cursor on appropriate text for changing it's color.</p>
<label class="txt-red">Red Color</label><br><br>
<label class="txt-green">Green Color</label><br><br>
<label class="txt-blue">Blue Color</label>
</body>
</html>
<html lang="en">
<head>
<title>Change Background Colors</title>
<style>
.txt-red:hover{
color: red;
}
.txt-green:hover{
color: green;
}
.txt-blue:hover{
color: blue;
}
</style>
</head>
<body>
<p>Place your cursor on appropriate text for changing it's color.</p>
<label class="txt-red">Red Color</label><br><br>
<label class="txt-green">Green Color</label><br><br>
<label class="txt-blue">Blue Color</label>
</body>
</html>