VOOZH about

URL: https://www.geeksforgeeks.org/css/css-any-link-selector/

⇱ CSS :any-link Selector - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

CSS :any-link Selector

Last Updated : 30 Aug, 2022

The :any-link selector is used to style every <a>, <area>, or <link> element that has an "href" attribute .It will skip applying CSS properties for those <a>, <area>, <href> tags in which "href" is not defined. Hence, it matches all elements that match :link or :visited.

Syntax:

:any-link{
 /*css properties*/
}

The below Examples illustrates the usage of :any-link pseudo-class selector.

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image

Note: Internet Explorer is not supported.

Browser supported:

  • Google Chrome 65+
  • Edge 79+
  • Firefox 50+
  • Opera 52+
  • Safari 9+
Comment
Article Tags: