Changing Attributes and Element Style

In this lesson, we change the style of attributes and elements.

Modifying the document tree allows you to change not only elements, but also attributes (with the setAttribute() method). It provides a couple of ways to change the appearance of the web page on-the-fly.

In the previous Chapter, section Exercise: Extra headers semantic and scope attributes of <th>, you displayed a table that defines the logical XOR operation, as shown in the image below:

Get hands-on with 1400+ tech skills courses.