-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtut10.html
More file actions
27 lines (27 loc) · 1.01 KB
/
tut10.html
File metadata and controls
27 lines (27 loc) · 1.01 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ids and Classes in HTML</title>
</head>
<body>
<h3>Ids and Classes HTML</h3>
<div id="mainBox" class ="redBg">
this is mainbox
</div>
<!-- Emmet -->
<!-- tagname.classname is a emmet shortcut to add class attribute to a element -->
<!-- tagname#id is a emmet shortcut to add id attribute to a element -->
<!-- we can also use tagname.classname.classname to add multiple classes attribute to element -->
<span id="id"></span>
<span class="redBg blackBorder"></span>
<!-- emment take div ass default element -->
<div class="myclass"></div>
<!-- span.myclass.myclass2.myclass3*4 -->
<span class="myclass myclass2 myclass3">First</span>
<span class="myclass myclass2 myclass3">Second</span>
<span class="myclass myclass2 myclass3">third</span>
<span class="myclass myclass2 myclass3">Fourth</span>
</body>
</html>