Html Class: Html Class attribute is used to define styles for Html elements with the same class name.
how to use the class in HTML
you can use the Html class attribute to define the styles for elements for different elements with the same class name.
Html class Example:
1.Define Class style in head Section
<style>
.back{ background-color:red; }
</style>
Class attribute starts with .(dot) then use the Class name and define style for that Html class.
2.Define class in body section
<body>
<div class="back">Html Class</div>
</body>
Here we call the class style with class="class-name" in the Html elements where you want to apply.
Html Class Example:
ReplyDeleteThanks for the wonderful information .Free HTML editor
Keep sharing