Last Updated: October 16, 2018
·
869
· coch

Showing links' urls in printed web pages

A simple but very useful trick to implement in css is to make the url of links visible in html pages when printed. This can be automatically accomplished with the following code:

@media print {
  a:after {
    content: " (" attr(href) ")";
  }
}

You may of course limit the links for which the url is printed using a particular class.