how to set css class in html code example
Example 1: how to create a css class
<style>
.myclass { /* CLASS CREATED */
background-color: transparent;
height:50px;
width:50px;
}
</style>
<body>
<div class="myclass"></div>
<body>
Example 2: Put a class in css
<html>
<head>
<style>
/* Make sure to use a full stop to instead only focus on the classname that is in your html page */
.class {
background-color: #eeeeee;
}
</style>
<head>
<body>
<div class="class">
<p>hi</p>
</div>
</body>
</html>