Access the element's class list. This is an HTMLClassList object which is useful to modify the list of classes of an element's "class" atribute. You can, of course, also use setAttribute and getAttribute but those methods will only get/set the whole class attribute as a string. Using classList is more convenient if you want to test/modify individual classes. Plase note, that the property itself is read-only (i.e. you cannot assign a different HTMLClassList object) but you can of course modify the list of classes itself using the methods of the provided HTMLClassList object.