<!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>
/* Element Selector */
p{
border: 2px solid red;
}
/* Id Selector */
#FirstPara{
color: green;
}
.redElement{
color: red;
}
/* Class Selector */
.bgBlue{
color: rgb(56, 228, 134);
background-color: blue;
}
/* Grouping Selector */
footer, span{
background-color: pink;
}
</style>
</head>
<body>
<h3>CSS Selectors</h3>
<p id="FirstPara">This is a simple paragraph to demonstrate CSS Selectors</p>
<p id="redElement">This is a another simple paragraph to demonstrate CSS Selectors</p>
<p id="thirdPara" class="redElement bgBlue">This is a another simple paragraph to demonstrate CSS Selectors</p>
<div>
<p>This is a yet another simple paragraph inside div to demonstrate CSS Selectors</p>
<span>This is Span</span>
</div>
<footer>This is Footer</footer>
</body>
</html>
No comments:
Post a Comment