As you have learnt the DOM Methods and Properties to Select and Change HTML Elements
now we will learn to Change the CSS Styles of the HTML Elements Using CSS DOM
To Work with CSS, DOM, we need to Select HTML Element by using DOM For Example: document.getElementById
Then We will use CSS Property document.getElementById(//Id Name//).style.property to Change the Style of the Element.
We have used CSS property style.color to change the color to Red of the paragraph Text.
CSS Styles Property
All the CSS Styles can be used as property, please refer to the Table