Skip to content

CSS Selectors

Target

About

The :target pseudo-class uses the URL's fragment (the part of the URL after the # symbol) and finds the element with this id.

Target

The element will not be matched if it was inserted dynamically. It must be in the DOM when the page loads or before the hash changes.