-
Notifications
You must be signed in to change notification settings - Fork 0
/
week5-2.html
63 lines (57 loc) · 1.58 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
63
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>week5-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.orange{color: orange;}
/* p.green{color: green; font-size: 2em;}*/
div>p{color: green; font-size: 1.5em;} /*decendent selector*/
/*div>p{color: green; font-size: 1.5em;}*/ /*child selector*/
p{color: brown;}
/*.italic{font-style: italic;}*/
#first span, #first b{font-style: italic;}
</style>
</head>
<body>
<!-- <div>
<p id="blue">Im the first p</p>
<p id="red" class="orange" style="color: violet;">Im the second p
<p id="magenta">im the first of the second</p>
</p>
<p class="orange" >Im the second p
<p id="magenta">im the first of the second</p>
</p> //html will look at style>id>class>element
<p>Im the third</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>
<span class="green">Im am span 1</span> -->
<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="iatlic">i am bold</b> -->
<span>Im am span 1 <p>p in span</p></span>
<b>i am bold</b>
<div>
<p>p in div</p>
<span>span in 2nd div</span>
<b>bold in 2nd div</b>
</div>
</div>
</body>
</html>