About
Some attributes have as value a whitespace-separated list of words.
Features
This attributes are specials because they allow special word functions.
Word selection based
You can make selection based on a word with the tilde equality
For instance, the below expression means that the foo attribute should contains the word bar in its value.
E[foo~="bar"]
List manipulation
In javascript, you can add or remove a word class with the class list.
Example:
element.classList.add('my-class')
More ? DOM - Class attribute
List
- rel of a link
- and many more