-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathClass$ID.html
More file actions
43 lines (39 loc) · 1.1 KB
/
Class$ID.html
File metadata and controls
43 lines (39 loc) · 1.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Class and ID</title>
<style type="text/css">
.redfont{
color:red;
}
.largefont{
font-size: 50px;
}
#onelogo{
color: blue;
font-size: 100px;
}
.secondlogo{
color: yellow;
}
</style>
</head>
<body>
<p class="redfont">This is the paragrah where we will use our first class</p>
<p class="largefont">this is the second paragraph where we will use our second class</p>
<pc class="largefont redfont">this is the paragraph usig two classes</p>
<h1>this is the first heading</h1>
<h3>this is the third heading</h3>
<p id="onelogo">this paragraph is for id</p>
<p id="onelogo" class="redfont">this is for checking preference between id class</p>
<!--
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>