Search⌘ K
AI Features

Other Selectors

Explore how to apply CSS pseudo-element selectors :before and :after to add content before or after elements, and use the :not selector to style elements that do not match certain criteria. This lesson helps you enhance web page appearance by mastering advanced CSS selectors.

The :before and :after selectors

There are two additional pseudo-element selectors, :before and :after, that do something no other selector can; they let you add content preceding or succeeding a given element.

When you remove the h1 ~ * ...