{"id":738,"date":"2024-10-10T13:14:20","date_gmt":"2024-10-10T13:14:20","guid":{"rendered":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/?post_type=chapter&#038;p=738"},"modified":"2025-07-06T04:09:16","modified_gmt":"2025-07-06T04:09:16","slug":"url-treatment","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/chapter\/url-treatment\/","title":{"raw":"Display of Urls in Web and Print Versions of Book","rendered":"Display of Urls in Web and Print Versions of Book"},"content":{"raw":"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.\u00a0 This makes the page easier to understand at a glance. Don't repeat the URL as part of the link text \u2014 URLs look ugly, and sound even uglier when a screen reader reads them out letter by letter.\r\n<h2>Examples<\/h2>\r\n<strong>Good:\u00a0<\/strong>\r\n\r\n<span>Playing audio or video\u00a0<\/span><span>of legally-obtained<\/span><span>\u00a0<\/span><span>physical media (music or audio visual materials like DVDs or Cds for example) during an in-person class session is 100% legal under\u00a0<\/span><a href=\"https:\/\/laws-lois.justice.gc.ca\/eng\/acts\/c-42\/page-10.html\"><span>Section 29.5 of the Copyright Act<\/span><\/a><span>.<\/span><span>\u00a0<\/span>\r\n\r\n<strong>Bad:<\/strong>\r\n\r\n<span>Playing audio or video\u00a0<\/span><span>of legally-obtained<\/span><span>\u00a0<\/span><span>physical media (music or audio visual materials like DVDs or Cds for example) during an in-person class session is 100% legal under\u00a0<\/span><span>Section 29.5 of the Copyright Act<\/span><span>.<\/span><a href=\"https:\/\/laws-lois.justice.gc.ca\/eng\/acts\/c-42\/page-10.html\"><span> https:\/\/laws-lois.justice.gc.ca\/eng\/acts\/c-42\/page-10.html<\/span><\/a>\r\n<h2>Code for adding Url to Print Versions of the Book<\/h2>\r\nWith Pressbooks there are options to export the book in a printable pdf format.\u00a0 In this case you will want to include the urls in the print copy so that your reader can locate your reference.\u00a0 This can be done by adding some code to the PDF stylesheet for your book:\r\n<blockquote><code>\/* Print urls in print output *\/\r\na::after{\r\ncontent: \" (\" attr(href) \") \";\r\n}<\/code><\/blockquote>\r\n<h3>Web Version with words as links<\/h3>\r\n<img src=\"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_web_link-1024x406.png\" alt=\"\" width=\"500\" height=\"198\" class=\"drop-shadow wp-image-739\" \/>\r\n<h3>Print PDF Version with url included<\/h3>\r\n[caption id=\"attachment_743\" align=\"alignnone\" width=\"500\"]<img src=\"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_pdf_link-1024x248.png\" alt=\"\" width=\"500\" height=\"121\" class=\"drop-shadow wp-image-743\" \/> PDF version with url printed out after the text[\/caption]\r\n\r\n&nbsp;\r\n\r\n&nbsp;","rendered":"<p>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.\u00a0 This makes the page easier to understand at a glance. Don&#8217;t repeat the URL as part of the link text \u2014 URLs look ugly, and sound even uglier when a screen reader reads them out letter by letter.<\/p>\n<h2>Examples<\/h2>\n<p><strong>Good:\u00a0<\/strong><\/p>\n<p><span>Playing audio or video\u00a0<\/span><span>of legally-obtained<\/span><span>\u00a0<\/span><span>physical media (music or audio visual materials like DVDs or Cds for example) during an in-person class session is 100% legal under\u00a0<\/span><a href=\"https:\/\/laws-lois.justice.gc.ca\/eng\/acts\/c-42\/page-10.html\"><span>Section 29.5 of the Copyright Act<\/span><\/a><span>.<\/span><span>\u00a0<\/span><\/p>\n<p><strong>Bad:<\/strong><\/p>\n<p><span>Playing audio or video\u00a0<\/span><span>of legally-obtained<\/span><span>\u00a0<\/span><span>physical media (music or audio visual materials like DVDs or Cds for example) during an in-person class session is 100% legal under\u00a0<\/span><span>Section 29.5 of the Copyright Act<\/span><span>.<\/span><a href=\"https:\/\/laws-lois.justice.gc.ca\/eng\/acts\/c-42\/page-10.html\"><span> https:\/\/laws-lois.justice.gc.ca\/eng\/acts\/c-42\/page-10.html<\/span><\/a><\/p>\n<h2>Code for adding Url to Print Versions of the Book<\/h2>\n<p>With Pressbooks there are options to export the book in a printable pdf format.\u00a0 In this case you will want to include the urls in the print copy so that your reader can locate your reference.\u00a0 This can be done by adding some code to the PDF stylesheet for your book:<\/p>\n<blockquote><p><code>\/* Print urls in print output *\/<br \/>\na::after{<br \/>\ncontent: \" (\" attr(href) \") \";<br \/>\n}<\/code><\/p><\/blockquote>\n<h3>Web Version with words as links<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_web_link-1024x406.png\" alt=\"\" width=\"500\" height=\"198\" class=\"drop-shadow wp-image-739\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_web_link-1024x406.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_web_link-300x119.png 300w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_web_link-768x305.png 768w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_web_link-65x26.png 65w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_web_link-225x89.png 225w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_web_link-350x139.png 350w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_web_link.png 1190w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<h3>Print PDF Version with url included<\/h3>\n<figure id=\"attachment_743\" aria-describedby=\"caption-attachment-743\" style=\"width: 500px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_pdf_link-1024x248.png\" alt=\"\" width=\"500\" height=\"121\" class=\"drop-shadow wp-image-743\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_pdf_link-1024x248.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_pdf_link-300x73.png 300w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_pdf_link-768x186.png 768w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_pdf_link-65x16.png 65w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_pdf_link-225x54.png 225w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_pdf_link-350x85.png 350w, https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-content\/uploads\/sites\/9\/2024\/10\/bears_pdf_link.png 1396w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><figcaption id=\"caption-attachment-743\" class=\"wp-caption-text\">PDF version with url printed out after the text<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":2,"menu_order":6,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-738","chapter","type-chapter","status-publish","hentry"],"part":718,"_links":{"self":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/pressbooks\/v2\/chapters\/738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":10,"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/pressbooks\/v2\/chapters\/738\/revisions"}],"predecessor-version":[{"id":763,"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/pressbooks\/v2\/chapters\/738\/revisions\/763"}],"part":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/pressbooks\/v2\/parts\/718"}],"metadata":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/pressbooks\/v2\/chapters\/738\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/wp\/v2\/media?parent=738"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/pressbooks\/v2\/chapter-type?post=738"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/wp\/v2\/contributor?post=738"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/bearguide\/wp-json\/wp\/v2\/license?post=738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}