A link in an HTML document is normally clickable. However, on a printed page, that feature is by natural causes not available.
<a href="#foo">Link to foo</a>
[... loads of content ...]
<a name="foo"/>Here is foo
Klicking on "Link to foo" on screen will scroll the page to the right place. Is there a way to refer to page number instead if this document is printed? I would like to do like
<a href="#foo" style="printing: page-reference;">Link to foo</a>
to make it print a page number instead of the underlined text "Link to foo".
Is this possible, using HTML 4 or 5, XHTML, CSS 2 or 3, or maybe with help of some fancy javascript?