-
Notifications
You must be signed in to change notification settings - Fork 0
/
week5-2.html
62 lines (57 loc) · 1.62 KB
/
week5-2.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
59
60
61
62
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Week 5 - 2</title>
<style type="text/css">
div{width: 300px;height: 300px;border: 1px solid;/*display: inline-block;*/}
p#blue{color: blue;}
p#red{color: red;}
p#magenta{color: magenta;}
p{color: brown;}
/*p.green{color: green;font-size: 1.5em;}*/
/*div p{color: green;font-size: 1.5em;}*/ /*descendant selector color*/
div>p{color: green;font-size: 1.5em;} /*child selector*/
/*.italic{font-style: italic;}*/
#first span, #first b{font-style: italic;} /*descendant + multiple selector*/
</style>
</head>
<!-- first priority:
style
id #
class .
element (p, h1, div) -->
<body>
<!-- <div>
<p id="blue">Im the first p. make me blue color</p>
<p id="red" class="orange" style="color:violet">Im the second p. make me red color<p id ="magenta">Im the first of the second p. magenta</p>
<p class="orange">Im the second p. make me red color<p id ="magenta">Im the first of the second p. magenta</p>
<p>Im the third</p>
</p>
</div> -->
<div id="first">
<!-- <p class="green">1</p>
<p class="green">2</p>
<p class="green">3
<p class="green">3.1</p>
<p class="green">3.2</p>
</p> -->
<p>1</p>
<p>2</p>
<span>3
<p>3.1</p>
<p>3.2</p>
</span>
<!-- <span class="italic">Im am span 1 <p>p in span</p></span>
<b class="italic">Im am bold</b> -->
<span>Im am span 1 <p>p in span</p></span>
<b>Im am bold</b>
</div>
<div>
<p>p in the div</p>
<span>span in the 2nd div</span>
<b>bold in 2nd div</b>
</div>
</body>
</html>