HTML - The class attribute

> (World Wide) Web - (W3|WWW) > HyperText markup Language (HTML)

1 - About

The class attribute is a global attribute (ie Every HTML element may have a class attribute specified) that permits to (select|categorize) elements.

Assigning classes to an element affects:


3 - Value

The value is a set of space-separated tokens representing the various classes that the element belongs to. A token is any string of one or more characters, none of which are space characters.

<div class='firstclass secondclass'/>

Authors are encouraged to use values that describe the nature of the content, rather than values that describe the desired presentation of the content.

4 - Management

4.1 - DOM Operations

To manipulate the class attribute with script, see DOM - Class attribute

4.2 - Join

5 - Documentation / Reference

web/html/class.txt ยท Last modified: 2019/02/09 11:43 by gerardnico