-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml8.html
21 lines (21 loc) · 899 Bytes
/
html8.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!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>Ids and Classes</title>
</head>
<body>
<!-- Id is a unique name provided to a element it can't be same of two different elements -->
<!-- class can be given to multiple element. Element will have all properties of a class. An element can be given multiple class -->
<div id="Mainclass" class="redcolour blackborder" >
This is a sample.
</div>
<!-- . is for class and # is for id like div#Mainclass and div.redcolour-->
<p class="redcolour"></p>
<a href="" id="Mainanchor"></a>
<!-- For multiple class use . after every class name like div.redcolour.blackborder -->
<!-- if we write just .redcolour it will give div.redcolour -->
</body>
</html>