Is there a CSS selector for elements containing certain text?

jantimon picture jantimon · Oct 5, 2009 · Viewed 649.5k times · Source

I am looking for a CSS selector for the following table:

Peter    | male    | 34
Susanne  | female  | 12

Is there any selector to match all TDs containing "male"?

Answer

Dean J picture Dean J · Oct 5, 2009

If I read the specification correctly, no.

You can match on an element, the name of an attribute in the element, and the value of a named attribute in an element. I don't see anything for matching content within an element, though.