learn id's and classes in html.
<!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 in HTML</title>
</head>
<body>
<h2> Ids and classes tutorial</h2>
<div id="mainBox" class="redBg blackBorder">
</div>
<span class="redBg"></span>
<!-- id is the unique but the class not the unique -->
<!-- .for the class and the #for the id -->
<span class=""></span>
<span id="mainSpan"></span>
<div class="redBg blackBorder anothercalss"></div>
<!-- emmets take div tag as default -->
<div class="blackBackground"></div>
<!-- creating multiple elements using emmet -->
<!-- span.myclass.myclass2.myclass3*4 is used to print the 4 similar elements usiing Emmet + <Tab> -->
<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 myclas3">forth</span>
</body>
</html>
Tags:
id's and classes