2.1.33 Modifying DOM Elements

Once we can grab DOM elements, we can modify them. There are several methods to change DOM elements. If we would like to set the attribute on an element…

If we would like to add a class to an element…

If we would like to change the style of an element…

Here we can use color names, RGB(a), hex codes and HSL(a).

We can even change the text content of an element…