Class and Id example together/combined

  • 0


<html>
<head>
<style>

#top {
    background-color: #ccc;
    padding: 20px
}

.intro {
    color: red;
    font-weight: bold;
}


</style>
</head>
<body>

<h1>Welcome to My Homepage</h1>


<div id="top">

<h1> hi i am id start from here  </h1>

<h1 class="intro"> hi i am class </h1>
<p class="intro"> My class closed here  </p>


<p> My id closed here </p>

</div>

</body>
</html>




 

No comments:

Post a Comment