CSS Selector Tester
Test a CSS selector on HTML, see the elements it selects, and find out the specificity of each selector. Scripts in the HTML do not run.
0 characters0 bytes
The HTML is read into a separate, inert document: scripts do not run, and no image or file is loaded.
How to Use It
- Paste the HTML.
- Type the selector.
- Read the matching elements and the specificity.
Questions and Answers
Do the scripts in my HTML run?
No. The HTML is read with DOMParser into a separate document that runs no scripts and loads nothing.
Good to Know
Selectors run with the browser's own engine, so support for :has() and similar depends on the browser. Pseudo-classes such as :hover never match in an inert document. Up to 500 elements are shown.
Related Tools
Source code of this tool (opens in a new tab)Report a problem on GitHub (opens in a new tab)