A CSS selector is a pattern used to target specific HTML elements on a webpage.
Selectors are mainly used in CSS to apply styles to matching elements, but they are also widely used in web scraping, browser automation, and testing tools to locate page content.
Also known as: Element selector, style selector, DOM selector.
A CSS selector matches one or more elements based on properties such as:
For example:
.product-title
This selector targets every element with the class product-title.