Show the URL After a Link

When you print a website, links lose their functionality. You can make the link accessible again if you can show the URL after a link.This is what you can do in CSS using the href attribute in an anchor link.

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

You can test this by trying to print the page, and looking at the print preview. The output should look something like this.

Link to Google

Post a Comment

To post code, use the code tag with a class language-*
Examples: code class="language-markup"code class="language-css"