css selectors
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Selectors</title>
<style>
p{
border: 2px solid red;
}
/* id selector */
#bgblue{
color: yellow;
background-color: blue;
}
/* class selector */
.redelement{
color:red;
}
/* grouping selector */
footer, span{
background-color: pink;
}
</style>
</head>
<body>
<h3>CSS Selectors</h3>
<p id="bgblue">This is a simple paragraph to demonstrate css selectors.</p>
<p id="secondpara" class="redelement">This is another simple paragraph to demonstrate css selectors.</p>
<div>
<p>This is yet another simple paragraph to demonstrate css selectors.</p>
<span>this is span</span>
</div>
<footer>This is footer.</footer>
</body>
</html>
Comments
Post a Comment