Customizing your Pressbook
Display of Urls in Web and Print Versions of Book
The best practice for adding links to a web document is to use meaningful words for the link. When readers scan your text, they can quickly understand what you are linking to. This makes the page easier to understand at a glance. Don’t repeat the URL as part of the link text — URLs look ugly, and sound even uglier when a screen reader reads them out letter by letter.
Examples
Good:
Playing audio or video of legally-obtained physical media (music or audio visual materials like DVDs or Cds for example) during an in-person class session is 100% legal under Section 29.5 of the Copyright Act.
Bad:
Playing audio or video of legally-obtained physical media (music or audio visual materials like DVDs or Cds for example) during an in-person class session is 100% legal under Section 29.5 of the Copyright Act. https://laws-lois.justice.gc.ca/eng/acts/c-42/page-10.html
Code for adding Url to Print Versions of the Book
With Pressbooks there are options to export the book in a printable pdf format. In this case you will want to include the urls in the print copy so that your reader can locate your reference. This can be done by adding some code to the PDF stylesheet for your book:
/* Print urls in print output */
a::after{
content: " (" attr(href) ") ";
}
Web Version with words as links
Print PDF Version with url included