MDN self-hosted library · e01.org

CSSStyleDeclaration: item() method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const propertyName = style[index];
js
const style = document.getElementById("div1").style;
const propertyName = style.item(1); // or style[1] - returns the second style listed