Link Styling by Destination

CSS snippets to style link destination.

a[href^="http://"]
{
  /* fully valid URL, likely external link */
}

a:not([href*='yourdomain.com']):not([href^='#']):not([href^='/']):after {
}

a[href="http://google.com"]
{
  /* link to specific website */
}

a[href^='/'],
a[href^='..'] {
  /* internal relative link */
}

a[href^='mailto:'] {
  /* email link */
}

a[href$='.pdf'] {
  /* PDF file */
}

Related