:target

Supported only by Firefox and Safari.

Selects an element that is a target; i.e. that has an ID with the same value as the URL's hash.

Testsheet:

p:target {font-style: italic;}

This paragraph has id="testHash". Initially it shouldn't be italic, but as soon as the URL becomes target.html#testHash it should become italic, since it's now a proper target.