What are Location Pseudo Classes?

Location pseudo-classes relate to links, and to targeted elements within the current document. Matches an element if the element would match either: link or: visited. Matches links that have not yet been visited.

  • any-link : Matches an element if the element would match either: link or: visited.
  • link : Matches links that have not yet been visited.
  • visited : Matches links that have been visited.
  • local-link: Matches links whose absolute URL is the same as the target URL, for example anchor links to the same page.
  • target: Matches the element which is the target of the document URL.
  • target-within: Matches elements which are the target of the document URL, but also elements which have a descendant which is the target of the document URL.
  • scope: Represents elements that are a reference point for selectors to match against.