Defining Contextual Selectors

A contextual selector is a style selector that identifies all HTML tags of a particular type that appear somewhere within the tag of another type. You use this kind of selector to style all emphasis tags that appear inside a table, for instance, or all strong tags that appear inside an ordered list. In these examples, the browser ignores emphasis tags that don't appear in a table or strong tags that don't appear in an ordered list, unless of course you provide additional style rules for these instances.

GEEKSPEAK

A contextual selector is a style selector that identifies all HTML tags of a particular type that appear somewhere within the tag of another type, such as all strong tags that appear inside an ordered list. ...

Get Web Design Garage now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.