zeek10.html
<!-- id is unique to the element in that webpage.Same class after defining can be used
for multiple elements. -->
<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>
<h1>IDS AND CLASSES IN HTML</h1>
<!-- #mainbox.redBg is shortcut for <div id="mainbox" class="redBg"></div>.
((# is short for id ))((. is shortcut for class and emmet uses div as default-->
<div id="mainbox" class="redBg">This is mainbox.</div>
<span class="redbg"></span>
<div id="mainspan">This is mainspan</div>
<div class="redBg blackBorder anotherclass">This div includes multiple classes.</div>
<span class="redBg">This has the same class redBg as mainbox.</span>
</body>
</html>
Comments
Post a Comment