-
Notifications
You must be signed in to change notification settings - Fork 0
/
IDandClass.html
43 lines (37 loc) · 1.22 KB
/
IDandClass.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Id abd classes in html</title>
</head>
<body>
<h3>IDs and classes tutorial</h3>
<div class="redBg" id="mainbox">
This is main box
</div>
</body>
<!-- ctrl + / to comment -->
<!-- emmet -->
<!--
span#spandID.spanClass
for
<span id="spanID" class="spanClass"></span>
-->
<!-- span.person*4 gives you 4 similar sapn with class person now press tab to switch to text entering. TRY!!! -->
<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>
</html>
<!--
-> id is to uniquely identify an element.
-> one id is to be assigned to only one element.
-> # for id
-->
<!--
-> classes is to assign beauty/functionality to more than one element at the same time.
-> . for class
-> div.redBg.blackBorder.anotherclass
gives
<div class="redBg blackBorder anotherclass"></div>
-->