CSS Selectors.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Selectors</title>
<style>
/* Id Selector */
#redElement{
color: red;
}
/* Class Selector */
.bgBlue{
color: yellow;
background-color: blue;
}
/* Class Selector */
.redElement{
color: rgb(211, 183, 23);
}
/* Element Selector */
p{
color: blueviolet;
border:2px solid red;
}
/* Grouping Selectors */
footer, span{
background-color: pink;
}
</style>
</head>
<body>
<h3>CSS Selectors</h3>
<p id="redElement">This is a simple pragraph to demonstrate css seletors</p>
<p id="secondPahra" class="redElement bgBlue">This is a another simple pragraph to demonstrate css seletors</p>
<div>
<p>This is the yet another simple pragraph to inside div demonstrate css seletors</p>
<span>This is span</span>
<footer>This is footer</footer>
</div>
</body>
</html>
Comments
Post a Comment