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;
}