asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Element Attributes > CLASS Attribute

CLASS Attribute | className Property


Specifies the class of the object.

Syntax

Inline <element CLASS = sClass...>
Script object.className = sClass ]

Possible Values

sClass String specifying the class or style rule.

The property is read/write.

Remarks

The class attribute is typically used to associate a particular style rule in a stylesheet with the element.

Example

<style>
  .style1 {... style definition ...}
</STYLE>
...
<ELEMENT class="style1">
  This will take the style defined for the class
</ELEMENT>
See Also

Using Stylesheets, CSS Properties Reference



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note