-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.html
58 lines (53 loc) · 1.59 KB
/
sample.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
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head>
<title>
CSS child Selector
</title>
<style>
/* ##This is child selector demo */
.parent-div > .child-div1 > #p1 {
color:white;
background: green;
padding:2px;
font-weight: lighter;
}
.parent-div > .child-div1 > p {
color:white;
background: blueviolet;
padding:2px;
}
/* ##This is a descendant selector Demo */
.parent-div p {
font-weight: bold;
}
</style>
</head>
<body style = "text-align: center;">
<div class="parent-div">
<div class="child-div1">
<h2 style = "color:green;">
I am Heading in First child Div
</h2>
<p id="p1">
I am p1 in First child Div
</p>
<p id="p2">
I am p2 in First child Div
</p>
</div>
<div class="child-div2">
<h4 style = "color:green;">
I am Heading in Second child Div
</h4>
<a href="index.html"></a>
<p>
I am p in First child Div
</p>
</div>
</div>
<p>Geeks Classes is a quick course to cover
algorithms questions.</p>
<p>This paragraph will not be styled.</p>
</body>
</html>