Overview / Web Technology
Web technology reference for developers
HTML
Structure of content on the web
CSS
Code used to describe document style
JavaScript
General-purpose scripting language
HTTP
Protocol for transmitting web resources
Web APIs
Interfaces for building web applications
Web Extensions
Developing extensions for web browsers
Accessibility
Build web projects usable for all
Web Technology
Web technology reference for developers
Filter sidebar
In this articleStylePropertyMap
CSSImageValue
CSSKeywordValue
CSSNumericValue
CSSPositionValue
Non-standard DeprecatedCSSStyleValue
CSSTransformValue
CSSUnparsedValue
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The clear()
method of the StylePropertyMap
interface removes all declarations in the StylePropertyMap
.
js
clear()
Parameters
None.
Return valueNone (undefined
).
The following example removes all styles within the elements style attribute.
js
// get the button element
const buttonEl = document.querySelector(".example");
// remove all styles from the style attribute
buttonEl.attributeStyleMap.clear();
Specifications Specification CSS Typed OM Level 1 .
This page was last modified on Apr 10, 2025 by MDN contributors.
View this page on GitHubâ¢
Report a problem with this contentRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4