What are the attributes with whitespace-separated list of words ? ( HTML /XML)


Some attributes have as value a whitespace-separated list of words.


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.


List manipulation

In javascript, you can add or remove a word class with the class list.



More ? DOM - Class attribute


Discover More
Chrome Devtool Selector
How to select elements based on attribute ? (with the css selector API)

How to select elements based on attribute ? (with the selector API , css) API This page is about selector expressions that select elements based on attribute. * An ID selector and a class selector...

Share this page:
Follow us:
Task Runner