JavaScript element.style Property
JavaScript element.style Property
The element.style
property gets or sets the inline style of an element.
Set CSS Inline Style
When setting, you should specify the individual CSS properties of style attribute which overrides the existing inline styles.
Example
Syntax
Return Values
Value | Explanation |
---|---|
Object | Returns an object representing the inline style of an element. |
Get CSS Inline Style
When getting, it returns a CSSStyleDeclaration object that contains a list of all styles properties for that element with values assigned for the attributes that are defined in the element's inline style attribute.
Example
Reminder
Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in JavaScript.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.