Ask Your Question

Revision history [back]

Yes, the CSS selector for identifying elements that have specific text is the "contains" selector. It is written as follows:

selector[attribute*=value]

where "selector" is any valid CSS selector, "attribute" is the name of the attribute containing the text, and "value" is the specific text to search for. For example:

p:contains("Lorem ipsum")

This selector will match all paragraphs that contain the text "Lorem ipsum".