Inspecting an Element's Style Values using JS | KIRUPA

by kirupa | 16 August 2016

How your HTML elements look is something that has fascinated people for centuries. The reason is that there is a whole lot more going on than what you see on screen. Your HTML elements are affected by CSS in a variety of complex ways. You have style rules (and media queries, and calc() expressions, !important tags, the cascade, etc.), inline styles, styles automatically set by your browser, and a whole lot more that can influence the styles that get applied and what your elements look like.

This is a companion discussion topic for the original entry at