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

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





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