-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDiv.html
More file actions
64 lines (59 loc) · 1.36 KB
/
Div.html
File metadata and controls
64 lines (59 loc) · 1.36 KB
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
64
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DIV</title>
<style type="text/css">
.redfont{
color:red;
}
.largefont{
font-size: 50px;
}
#onelogo{
color: blue;
font-size: 100px;
}
.secondlogo{
color: yellow;
}
.first-section{
background-color: cadetblue;
width: 200px;
float: left;
}
.second-section{
background-color: blueviolet;
width: 200px;
float:left;
}
.third-section{
background-color:yellow;
width: 200px;
}
</style>
</head>
<body>
<div class="first-section">
<p >This is the paragrah where we will use our first class</p>
<p >this is the second paragraph where we will use our second class</p>
</div>
<div class="second-section">
<p>this is the paragraph usig two classes</p>
<h1>this is the first heading</h1>
</div>
<div class="third-section">
<h3>this is the third heading</h3>
<p >this paragraph is for id</p>
<p >this is for checking preference between id class</p>
</div>
<!--
we can use class more than one time in a single web page
we can use more than one class in one element
we can use id one time in a web page like a logo
we cannot use more than two id in a element
ID is preferable than class
-->
</body>
</html>