A couple of months ago I wrote this post that showed how to display link URLs in print with the aid of JavaScript. Honestly speaking, I hate to use JavaScript when the same thing can be actually done with CSS. However, at the time of that post IE 6 and 7 got a still significant market share. But now, as Brian Adams sings, times are changing and IE 8 is gaining its momentum among the various IE machines.
IE 8 actually supports CSS generated content, so it's possible to display link URLs in print only with these few lines of code:
@media print { a[href]:after { content: ' (' attr(href) ') '; } }
Is that all? Actually, yes! Anyway, if your primary concern is still supporting old dinosaurs like IE 6 and 7, then my previous post will probably fit your needs.
What about something like:
About Page
Wouldn't that appear (when printed) as "About Page (/about)"? This could confuse people.
Right. You can extend my code by adding an additional check on the link, for example a[href^="http://"] using CSS3 selectors.