You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Web-Dev-For-Beginners/webdevbootcamp/CSSselectors.html

38 lines
1.1 KiB

<!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;
}
/* this is id selector */
#firstPara{
color: green;
}
/* this is class selector */
.bgBlue{
color: yellow;
background-color: blue;
}
/* this is grouping selector */
footer, span{
background-color: darkmagenta;
}
</style>
</head>
<body>
<h1>CSS SELECTORS</h1>
<p id="firstPara">This is a simple demonstrate css selectors </p>
<p id="secondPara " class="redElement bgBlue">This is another simple demonstrate css selectors </p>
<div>
<p>This is yet another simple paragraph inside div demonstrate css selectors </p>
<span>This is span</span>
</div>
<footer>This is footer </footer>
</body>
</html>