-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcssSelector.html
52 lines (50 loc) · 1.68 KB
/
cssSelector.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!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 Selector</title>
<style>
h1{ /* element selector*/
color: chartreuse;
}
div{
background-color: bisque;
}
div#red{
background-color: antiquewhite;
color: red;
border:2px solid brown
}
span.class,h3{
background-color: aqua;
color: aliceblue;
border: 2px solid black;
}
*{
margin: 0;
padding: 0;
}
</style>
</head>
<!--css selector used to select the elements in html for styling-->
<body>
<div>
<h1>This is my CSS Selector page</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Suscipit necessitatibus facere quod quidem consequatur ratione atque commodi tenetur, fuga molestias dolorum sunt saepe accusantium pariatur veritatis distinctio nemo eveniet veniam.
</p>
<h1>This is other h1</h1>
<div id="red">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Nisi, quidem quo soluta eos cupiditate obcaecati dicta atque est voluptates perferendis illo ad laborum explicabo facere? Asperiores doloremque cum inventore dolores?</p>
</div>
<h3>I am h3</h3>
</div>
<div>
<span class="class">First tag</span>
<span class="class">Second tag</span>
<span class="class">Third tag</span>
</div>
</body>
</html>