/
Change CSS property of a DOM element

Change CSS property of a DOM element

Easy peasy!

You can change all these properties on DOM element using the “style” property. For example:

var Body = document.querySelector('body'); Body.style.backgroundColor = "red";

This is a key concept is creating interesting visual effects with Javascript.

Related content

CSS Colors
CSS Colors
More like this
Styling in developer tools
Styling in developer tools
More like this
Using the Chrome Tools for CSS
Using the Chrome Tools for CSS
More like this
DOM Element
DOM Element
More like this
Inspecting content for styling manipulation
Inspecting content for styling manipulation
More like this
CSS Pseudo Class Selectors
CSS Pseudo Class Selectors
More like this