Global Attributes
HTML class attribute
Assigns reusable class names for CSS, DOM queries and other author-defined grouping. Multiple classes are separated by whitespace; unlike id, they need not be unique. Applicability: global HTML attribute, subject to element-specific restrictions and browser support.
Formal Syntax & Structure
html syntaxhtml
class="note featured"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| class | space-separated tokens | Assigns reusable class names for CSS, DOM queries and other author-defined grouping. Multiple classes are separated by whitespace; unlike id, they need not be unique. |
Working Example
Example Snippethtml
<p class="note featured">Read this first.</p>