Ids and Classes(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>

    <h3>Ids and classes Tutorials</h3>

    <div id="mainbox" class="redbg blackborder">this is mainbox</div>

    <span class="redbg"></span>

    <!-- emmit -->

    <!-- . is for class and # is for id -->

    <span class="redbg"></span>

    <span id="mainSpan"></span>

    <div class="redbg blackborder anotherclass"></div>


    <!-- emmet takes div tag as default -->

    <div class="background"></div>


    <!-- span.myclass.myclass2.myclass3*4 <tab> to print 4 similar elements uaing emme -->

    <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">four</span>

</body>


</html>

Comments

Popular posts from this blog

Transform Property In CSS

More on CSS Selectors