What is HTML class attribute?

Query By: SIMRAN WANKAN

J

Jessica

HTML Class Attribute

In HTML, the class attribute is used to define equal styles for elements with the same class name. For more understanding, you can pass more than two attributes in the same class which will make your web designing more simple and flexible just only using class attributes... Explore the full details of Class Attribute in detail with the full tutorial just by clicking here or simply visiting our Tutorial section.


Example of Class Attribute

Here is a simple example that will help you to understand more:

<p class="paragraph">This is the paragraph with one class attribute.</p>


In this example, we are using the "paragraph" attribute for the class to write some CSS properties to make this <p> tag text more comfortable. On the other hand, we are using to class attributes "paragraph" and "bold" for <p> tag text.


<p class="paragraph bold">This is the paragraph with two class attribute.</p>

1 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)