CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS :target Selector

CSS :target Selector

 

 

The :target selector is used to styling the currently active target element. The method by which it works is that URLs with an # followed by an anchor name link to a certain element within a document. The element being linked to is the target element and all styles applied to it.

 

Syntax:-

 

Its syntax is:-
:target {
  css declarations;
}

Code Explanation

All Tutorials related to CSS Selectors

All Sections related to CSS