Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

class

The HTML class attribute binds one or more classes to an element.

HTML Code Example

Bind a CSS class to an element. <button class="btntype1">Help</button> Bind two CSS classes to an element. <button class="btntype1 btnspecial">Help</button>

JavaScript Interfacing

This attribute can be added to an element and its value may be changed any time using JavaScript. element.className = "btntype1";

Possible Values

class name - a class name or space separated list of class names.

HTML

Core Attributes

accesskeyclasscontenteditabledirdraggable