CSS selector tester
Paste HTML, type a selector, and see exactly which elements it matches before you use it in a watch.
What this tool does
A CSS selector picks elements from a page by tag, class, id or position. This tool parses the HTML you paste with your browser's own parser, runs your selector, and lists each match with its markup and visible text. It shows the first 50 matches and tells you when a selector is invalid.
To get HTML to paste, open the page, right-click the part you want and choose Inspect, then copy the element or view the page source. Pasting a smaller region makes results easier to read.
How it relates to Alertcat filters
Alertcat watches can keep only the parts of a page that match a CSS selector. Everything else is ignored, so changes outside the selector never cause an alert. This is the fastest way to watch one price, one headline or one stock message on a busy page.
A selector such as .product-price keeps the price and drops the rest. A selector such as main article h2 keeps article headings only. Alertcat can also remove elements by selector, which is useful for cookie banners, ad slots and live counters.
Alertcat fetches pages over plain HTTP today. Content that a script builds after the page loads is not in the fetched HTML, so a selector cannot find it. Browser rendering is not available yet. Check the page source first: if your target text is there, a selector will work.
Using the result in a watch
- Paste the page HTML and a selector, then press Test selector.
- Aim for exactly one match, or exactly the set you want. Add a class or parent to narrow a broad selector.
- Prefer stable class names over positions such as nth-child, which break when the page layout shifts.
- Copy the selector into the CSS filter field of your watch, save, and check the preview.
Frequently asked questions
Which selector syntax is supported?
Standard CSS selectors that your browser understands. Alertcat evaluates selectors on the server, so unusual browser-only pseudo-classes may not work there.
Why does my selector match here but not in a watch?
Most often the live page builds that element with JavaScript, so it is missing from the fetched HTML. Paste the raw page source, not the rendered view from developer tools.
Can I combine several selectors?
Yes. A comma joins selectors, and a watch can hold more than one filter. Test the combined selector here first.
Test a CSS selector
Related
Watch the pages that matter
Alertcat is in early access. Tell us what you want to watch and we will set up your team.