Table of Contents
Back Button
Back to Chapter
Control Statements
No items found.
Function & Events
No items found.
Array and its Types
No items found.
OOP : Object Oriented Programming
No items found.
Javascript Standards
No items found.
HTML DOM
No items found.
Javascript : Advanced 1
No items found.
Javascript : Advanced 2
No items found.
Additional JavaScript
No items found.

CSS Properties

Introduction

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

Properties

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.

Example

Welcome To The World Of Javascript

Here,

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

Ask queries
Contact Us on Whatsapp
Hi, How Can We Help You?