This paragraph simply takes on the browsers default paragraph style.

By adding inline CSS styling to this paragraph, we can override the default styles.

And now we are back to a regular default paragraph without any inline styles.


Contextual selectors are very selective.

This example shows how to target a specific tag using the document hierarchy.

Tags only need to be descendants in the order stated in the selector; other tags can be in between and the selector still works.


This is a heading tag with the same class as the second paragraph

This p tag has no class.

When this p tag is identified with a class, we can target it regardless of its position in the hierarchy.


All about siblings selectors

There must be at least two selectors, with a + sign before the last one.

The targeted selector will only be affected if it is a sibling, and preceded by, the one before the + sign.

W3c Compliant| CSS Compliant