HTML Class

By using the class attribute in HTML, we can use the same style in a multipple space, it is very easy to define the same style for the elements of the same class name from the HTML classes.

The HTML class is a very important part of cascading style sheet. The class attribute is use for CSS and Javascript. CSS is use to design the website and most of the class attribute is use in css.

HTML Class Example

<!DOCTYPE html>
<html>
<head>
<style>
.textclass {
    background-color: Red;
}
</style>
</head>

<body>
<div class="textclass">
<p>"The HTML class is a very important part of cascading style sheet. The class attribute is use for CSS and Javascript. CSS is use to design the website and most of the class attribute is use in css ."</p>
</div>
</body>

</html>

Output

“The HTML class is a very important part of cascading style sheet. The class attribute is use for CSS and Javascript. CSS is use to design the website and most of the class attribute is use in css .”