{"id":35,"date":"2018-05-15T15:18:51","date_gmt":"2018-05-15T15:18:51","guid":{"rendered":"https:\/\/pressbooks.library.ryerson.ca\/ebooks\/?post_type=chapter&#038;p=35"},"modified":"2021-07-19T18:00:40","modified_gmt":"2021-07-19T18:00:40","slug":"chapter-3-editing-epubs","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/chapter\/chapter-3-editing-epubs\/","title":{"raw":"Chapter 3 \u2022 Editing ePubs","rendered":"Chapter 3 \u2022 Editing ePubs"},"content":{"raw":"Editing ePubs enables authors and publishers familiar with HTML and CSS to make changes and create special effects outside of the originating program.\r\n<h2>Opening an ePub<\/h2>\r\nThe .epub file type is a compressed archive containing the pages in XHTML, style specifications in CSS, and accompanying images, fonts, audio, video, JavaScript, and other files (if any). Opening and editing an .epub file generally requires a third-party app that can read XHTML, such as Sigil (Figure 3.1) or Oxygen XML Editor. Opening the ePub gives access to the XHTML and styles.\r\n\r\nXHTML is similar to HTML. The X for \u201cextensible\u201d means that users can write their own tags, provided that they explain them. M stands for markup, meaning the text and objects are indicated or pointed to with tags, which are enclosed in less-than and greater-than signs. An example of a tag is &lt;p&gt; for paragraph. A paragraph needs an opening &lt;p&gt; at the beginning and a closing &lt;\/p&gt; tag at the end. Some tags are self-closing, including &lt;img\/&gt; for image, &lt;br\/&gt; for break (carriage return), and &lt;hr\/&gt; for horizontal rule (line). With these tags the closing \u201c\/\u201d is included at the end of the tag.\r\n\r\n<img style=\"border: 1px solid gray\" src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_Sigil-1024x883.jpg\" alt=\"Screenshot of an eBook editor software highlighting personalized fonts files\" width=\"512\" height=\"441\" class=\"aligncenter wp-image-42\" \/>\r\n<h2>HTML and CSS for ePub<\/h2>\r\nSome of the most common tags used in ePubs are the paragraph, heading, and image tags (Table 3.1).\r\n<table style=\"width: 52.79856687898089%;background-color: azure;margin: 0px auto;border-collapse: collapse\"><caption style=\"background: paleturquoise\"><strong>Table 3.1. HTML Tags for ePub<\/strong><\/caption>\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 27.480916030534353%\"><strong>&lt;p&gt;<\/strong><\/td>\r\n<td style=\"width: 77.86259541984732%\">paragraph<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.480916030534353%\"><strong>&lt;h1&gt;\u2026&lt;h6&gt;<\/strong><\/td>\r\n<td style=\"width: 77.86259541984732%\">heading 1 (largest) to heading 6 (smallest)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.480916030534353%\"><strong>&lt;span&gt;<\/strong><\/td>\r\n<td style=\"width: 77.86259541984732%\">span, region of text to be selected and styled<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.480916030534353%\"><strong>&lt;img\/&gt;<\/strong><\/td>\r\n<td style=\"width: 77.86259541984732%\">image, e.g., &lt;img src=\"imagename.jpg\" \/&gt;<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.480916030534353%\"><strong>&lt;figure&gt;<\/strong><\/td>\r\n<td style=\"width: 77.86259541984732%\">Unites an &lt;img&gt; tag and its caption (&lt;figcaption&gt;)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.480916030534353%\"><strong>&lt;figcaption&gt;<\/strong><\/td>\r\n<td style=\"width: 77.86259541984732%\">caption for an &lt;img&gt; tag<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.480916030534353%\"><strong>&lt;br\/&gt;<\/strong><\/td>\r\n<td style=\"width: 77.86259541984732%\">break, or carriage return (self-closing), can be replaced with styles \"padding\" or \"margin\"<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.480916030534353%\"><strong>&lt;hr\/&gt;<\/strong><\/td>\r\n<td style=\"width: 77.86259541984732%\">horizontal rule, or line; there are no vertical rules, but they can be made with a border-left or border-right style on an object.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nTo style a given tag with CSS, the tag must first be selected. This can be done by siting the tag itself, such as \u201cp\u201d for paragraph. However the specified style will be applied to all paragraphs. To select one specific paragraph, it\u2019s helpful to identify that paragraph with an ID (e.g., &lt;p id=\"first-para\"&gt;). The ID should be an alphanumeric name with no spaces. An ID can only be applied to one tag on a page. To select multiple tags, use a class. The format is similar: &lt;img class=\"body-fig\"&gt;. To cite an ID in CSS, use the # symbol. A period (.) indicates a class.\r\n<table style=\"width: 50%;background: azure;margin: 0 auto;border-collapse: collapse\"><caption style=\"background: paleturquoise\"><strong>Table 3.2. HTML Identifiers for CSS Styling<\/strong><\/caption>\r\n<tbody>\r\n<tr>\r\n<td><strong>Identifier<\/strong><\/td>\r\n<td><strong>Example in HTML<\/strong><\/td>\r\n<td><strong>Selector in CSS<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>tag, e.g., &lt;p&gt;<\/strong><\/td>\r\n<td>&lt;p&gt;<\/td>\r\n<td>p<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>ID<\/strong><\/td>\r\n<td>&lt;p id=\"first-para\"&gt;<\/td>\r\n<td>#first-para<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>class<\/strong><\/td>\r\n<td>&lt;img class=\"body-fig\"&gt;<\/td>\r\n<td>.body-fig<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nTable 3.3 shows some styles that can be applied to text.\r\n<table style=\"width: 50%;background: azure;margin: 0 auto;border-collapse: collapse\"><caption style=\"background: paleturquoise\"><strong>Table 3.3. Styles for Text and Images<\/strong><\/caption>\r\n<tbody>\r\n<tr>\r\n<td><strong>text<\/strong><\/td>\r\n<td><strong>image<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td>font-family:\r\nfont-size:\r\nfont-style:\r\nfont-weight:\r\nline-height:\r\ncolor:<\/td>\r\n<td>width:\r\nheight:\r\nfloat:\r\nmargin:<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h2 style=\"text-align: left\">Creative Effects with ePubs<\/h2>\r\nSome special effects that enhance ePubs include drop-caps, drop shadows on text and images, and borders on images.\r\n\r\n<strong>Decorative fonts.<\/strong> Royalty-free fonts available from Google Fonts and other sources can be used in web-based and ePub eBooks. Fonts can either be linked to their internet sources as style sheets or included on the web server or in the eBook. Technically an ePub should be readable without being connected to the internet, therefore it\u2019s best to download the font and include it in the ePub. When editing an ePub in Sigil, include the font file in the Fonts folder and specify it in the style sheet (<span style=\"color: #ff0000\"><strong>Figure 3.2<\/strong><\/span>).\r\n\r\n[caption id=\"attachment_407\" align=\"aligncenter\" width=\"1024\"]<a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-scaled.jpg\"><img src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-1024x626.jpg\" alt=\"\" width=\"1024\" height=\"626\" class=\"wp-image-407 size-large\" \/><\/a> <strong>Figure 3-2.<\/strong> Decorative font placed in the Fonts folder and specified for the h1 tag in an ePub.[\/caption]\r\n\r\n<strong>Drop-caps.<\/strong> Drop-caps can be created by making the first letter of the first paragraph larger than the surrounding text. In the example (<span style=\"color: #ff0000\"><strong>Figure 3.3<\/strong><\/span>), the first letter in the paragraph, \u201cC,\u201d is selected using the ::first-letter selector, which is built in to the latest version of HTML. The letter \u201cC\u201d has the surrounding text wrapped around it using the \u201cfloat\u201d left style. the letter \u201cC\u201d is set to 4.4 times the size of the other text using the \u201cem\u201d measurement. (One em is the size of the text in points, so for 14-pt. text like that shown, one em would be a square 14 pt. on each side.) The \u201cC\u201d is set to wrap the surrounding letters using the \u201cfloat: left\u201d style. Margins are set for the top, right, bottom, and left positions to move the text further away to the right of the \u201cC\u201d and bring it closer to the bottom. The letter has a drop-shadow created with the text-shadow style, which has four specifications\u2014right offset, vertical offset, blend distance, and colour.\r\n\r\n[caption id=\"attachment_46\" align=\"aligncenter\" width=\"900\"]<img style=\"border: 1px solid gray\" src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/drop-cap.jpg\" alt=\"\" width=\"900\" height=\"669\" class=\"wp-image-46 size-full\" \/> <strong>Figure 3.3.<\/strong> Selectors and styles for creating borders and drop shadows around images and drop caps for text.[\/caption]\r\n\r\n<strong>Images.<\/strong> Images, like the one shown in <span style=\"color: #ff0000\"><strong>Figure 3.3<\/strong><\/span>, can have borders applied using the \u201cborder\u201d style, with specifications for width, line type, and colour. A drop-shadow can also be applied using the \u201cbox-shadow\u201d style, which is similar to text-shadow described above. (Not all platforms, eReader apps, and eReaders may support the drop-shadow style.)\r\n\r\n<strong>Small caps.<\/strong> These are smaller uppercase letters at the beginning of a chapter or section (<span style=\"color: #ff0000\"><strong>Figure 3.4<\/strong><\/span>), often following a drop-cap. Small caps can be created by selecting the desired region of text with opening and closing &lt;span&gt; tags, then setting the \u201cfont-variant: small-caps\u201d style.\r\n\r\n[caption id=\"attachment_52\" align=\"aligncenter\" width=\"512\"]<img style=\"border: 1px solid gray\" src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/small-caps.jpg\" alt=\"\" width=\"512\" height=\"179\" class=\"wp-image-52\" \/> <strong>Figure 3.4.<\/strong> Example of small caps set with the \u201cfont-variant\u201d style.[\/caption]\r\n\r\n<strong>Sidebars.<\/strong> Sidebars are boxes with ancillary information relating to the current chapter or section (<span style=\"color: #ff0000\"><strong>Figure 3.5<\/strong><\/span>). Sidebars can be created by inserting one styled &lt;p&gt; tag, or if more than one paragraph, a &lt;div&gt; or division tag. The sidebar can then be styled with the \u201cborder\u201d and \u201cbackground\u201d styles.\r\n\r\n[caption id=\"attachment_50\" align=\"aligncenter\" width=\"768\"]<img style=\"border: 1px solid gray\" src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/sidebar-1024x329.jpg\" alt=\"\" width=\"768\" height=\"247\" class=\"wp-image-50\" \/> <strong>Figure 3.5.<\/strong> Example of a sidebar with coloured background and border with rounded corners (border-radius).[\/caption]\r\n\r\n<strong>Pull quotes.<\/strong> These are one or more sentences or phrases taken from the text that are set in much larger type in order to add interest to the text (<span style=\"color: #ff0000\"><strong>Figure 3.6<\/strong><\/span>). A pull quote can be created by especially styling a &lt;p&gt; paragraph tag, or using a &lt;div&gt; division. The text can be set to a larger font and with quote marks if appropriate.\r\n\r\n[caption id=\"attachment_49\" align=\"aligncenter\" width=\"768\"]<img style=\"border: 1px solid gray\" src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/pull-quote-1024x315.jpg\" alt=\"\" width=\"768\" height=\"236\" class=\"wp-image-49\" \/> <strong>Figure 3.065.<\/strong> Example of a pull-quote.[\/caption]","rendered":"<p>Editing ePubs enables authors and publishers familiar with HTML and CSS to make changes and create special effects outside of the originating program.<\/p>\n<h2>Opening an ePub<\/h2>\n<p>The .epub file type is a compressed archive containing the pages in XHTML, style specifications in CSS, and accompanying images, fonts, audio, video, JavaScript, and other files (if any). Opening and editing an .epub file generally requires a third-party app that can read XHTML, such as Sigil (Figure 3.1) or Oxygen XML Editor. Opening the ePub gives access to the XHTML and styles.<\/p>\n<p>XHTML is similar to HTML. The X for \u201cextensible\u201d means that users can write their own tags, provided that they explain them. M stands for markup, meaning the text and objects are indicated or pointed to with tags, which are enclosed in less-than and greater-than signs. An example of a tag is &lt;p&gt; for paragraph. A paragraph needs an opening &lt;p&gt; at the beginning and a closing &lt;\/p&gt; tag at the end. Some tags are self-closing, including &lt;img\/&gt; for image, &lt;br\/&gt; for break (carriage return), and &lt;hr\/&gt; for horizontal rule (line). With these tags the closing \u201c\/\u201d is included at the end of the tag.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid gray\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_Sigil-1024x883.jpg\" alt=\"Screenshot of an eBook editor software highlighting personalized fonts files\" width=\"512\" height=\"441\" class=\"aligncenter wp-image-42\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_Sigil-1024x883.jpg 1024w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_Sigil-300x259.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_Sigil-768x662.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_Sigil-65x56.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_Sigil-225x194.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_Sigil-350x302.jpg 350w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_Sigil.jpg 1710w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/p>\n<h2>HTML and CSS for ePub<\/h2>\n<p>Some of the most common tags used in ePubs are the paragraph, heading, and image tags (Table 3.1).<\/p>\n<table style=\"width: 52.79856687898089%;background-color: azure;margin: 0px auto;border-collapse: collapse\">\n<caption style=\"background: paleturquoise\"><strong>Table 3.1. HTML Tags for ePub<\/strong><\/caption>\n<tbody>\n<tr>\n<td style=\"width: 27.480916030534353%\"><strong>&lt;p&gt;<\/strong><\/td>\n<td style=\"width: 77.86259541984732%\">paragraph<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.480916030534353%\"><strong>&lt;h1&gt;\u2026&lt;h6&gt;<\/strong><\/td>\n<td style=\"width: 77.86259541984732%\">heading 1 (largest) to heading 6 (smallest)<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.480916030534353%\"><strong>&lt;span&gt;<\/strong><\/td>\n<td style=\"width: 77.86259541984732%\">span, region of text to be selected and styled<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.480916030534353%\"><strong>&lt;img\/&gt;<\/strong><\/td>\n<td style=\"width: 77.86259541984732%\">image, e.g., &lt;img src=&#8221;imagename.jpg&#8221; \/&gt;<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.480916030534353%\"><strong>&lt;figure&gt;<\/strong><\/td>\n<td style=\"width: 77.86259541984732%\">Unites an &lt;img&gt; tag and its caption (&lt;figcaption&gt;)<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.480916030534353%\"><strong>&lt;figcaption&gt;<\/strong><\/td>\n<td style=\"width: 77.86259541984732%\">caption for an &lt;img&gt; tag<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.480916030534353%\"><strong>&lt;br\/&gt;<\/strong><\/td>\n<td style=\"width: 77.86259541984732%\">break, or carriage return (self-closing), can be replaced with styles &#8220;padding&#8221; or &#8220;margin&#8221;<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.480916030534353%\"><strong>&lt;hr\/&gt;<\/strong><\/td>\n<td style=\"width: 77.86259541984732%\">horizontal rule, or line; there are no vertical rules, but they can be made with a border-left or border-right style on an object.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>To style a given tag with CSS, the tag must first be selected. This can be done by siting the tag itself, such as \u201cp\u201d for paragraph. However the specified style will be applied to all paragraphs. To select one specific paragraph, it\u2019s helpful to identify that paragraph with an ID (e.g., &lt;p id=&#8221;first-para&#8221;&gt;). The ID should be an alphanumeric name with no spaces. An ID can only be applied to one tag on a page. To select multiple tags, use a class. The format is similar: &lt;img class=&#8221;body-fig&#8221;&gt;. To cite an ID in CSS, use the # symbol. A period (.) indicates a class.<\/p>\n<table style=\"width: 50%;background: azure;margin: 0 auto;border-collapse: collapse\">\n<caption style=\"background: paleturquoise\"><strong>Table 3.2. HTML Identifiers for CSS Styling<\/strong><\/caption>\n<tbody>\n<tr>\n<td><strong>Identifier<\/strong><\/td>\n<td><strong>Example in HTML<\/strong><\/td>\n<td><strong>Selector in CSS<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>tag, e.g., &lt;p&gt;<\/strong><\/td>\n<td>&lt;p&gt;<\/td>\n<td>p<\/td>\n<\/tr>\n<tr>\n<td><strong>ID<\/strong><\/td>\n<td>&lt;p id=&#8221;first-para&#8221;&gt;<\/td>\n<td>#first-para<\/td>\n<\/tr>\n<tr>\n<td><strong>class<\/strong><\/td>\n<td>&lt;img class=&#8221;body-fig&#8221;&gt;<\/td>\n<td>.body-fig<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Table 3.3 shows some styles that can be applied to text.<\/p>\n<table style=\"width: 50%;background: azure;margin: 0 auto;border-collapse: collapse\">\n<caption style=\"background: paleturquoise\"><strong>Table 3.3. Styles for Text and Images<\/strong><\/caption>\n<tbody>\n<tr>\n<td><strong>text<\/strong><\/td>\n<td><strong>image<\/strong><\/td>\n<\/tr>\n<tr>\n<td>font-family:<br \/>\nfont-size:<br \/>\nfont-style:<br \/>\nfont-weight:<br \/>\nline-height:<br \/>\ncolor:<\/td>\n<td>width:<br \/>\nheight:<br \/>\nfloat:<br \/>\nmargin:<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"text-align: left\">Creative Effects with ePubs<\/h2>\n<p>Some special effects that enhance ePubs include drop-caps, drop shadows on text and images, and borders on images.<\/p>\n<p><strong>Decorative fonts.<\/strong> Royalty-free fonts available from Google Fonts and other sources can be used in web-based and ePub eBooks. Fonts can either be linked to their internet sources as style sheets or included on the web server or in the eBook. Technically an ePub should be readable without being connected to the internet, therefore it\u2019s best to download the font and include it in the ePub. When editing an ePub in Sigil, include the font file in the Fonts folder and specify it in the style sheet (<span style=\"color: #ff0000\"><strong>Figure 3.2<\/strong><\/span>).<\/p>\n<figure id=\"attachment_407\" aria-describedby=\"caption-attachment-407\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-1024x626.jpg\" alt=\"\" width=\"1024\" height=\"626\" class=\"wp-image-407 size-large\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-1024x626.jpg 1024w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-300x183.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-768x469.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-1536x938.jpg 1536w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-2048x1251.jpg 2048w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-65x40.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-225x137.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/SG-W_DecorativeFont-350x214.jpg 350w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-407\" class=\"wp-caption-text\"><strong>Figure 3-2.<\/strong> Decorative font placed in the Fonts folder and specified for the h1 tag in an ePub.<\/figcaption><\/figure>\n<p><strong>Drop-caps.<\/strong> Drop-caps can be created by making the first letter of the first paragraph larger than the surrounding text. In the example (<span style=\"color: #ff0000\"><strong>Figure 3.3<\/strong><\/span>), the first letter in the paragraph, \u201cC,\u201d is selected using the ::first-letter selector, which is built in to the latest version of HTML. The letter \u201cC\u201d has the surrounding text wrapped around it using the \u201cfloat\u201d left style. the letter \u201cC\u201d is set to 4.4 times the size of the other text using the \u201cem\u201d measurement. (One em is the size of the text in points, so for 14-pt. text like that shown, one em would be a square 14 pt. on each side.) The \u201cC\u201d is set to wrap the surrounding letters using the \u201cfloat: left\u201d style. Margins are set for the top, right, bottom, and left positions to move the text further away to the right of the \u201cC\u201d and bring it closer to the bottom. The letter has a drop-shadow created with the text-shadow style, which has four specifications\u2014right offset, vertical offset, blend distance, and colour.<\/p>\n<figure id=\"attachment_46\" aria-describedby=\"caption-attachment-46\" style=\"width: 900px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid gray\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/drop-cap.jpg\" alt=\"\" width=\"900\" height=\"669\" class=\"wp-image-46 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/drop-cap.jpg 900w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/drop-cap-300x223.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/drop-cap-768x571.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/drop-cap-65x48.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/drop-cap-225x167.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/drop-cap-350x260.jpg 350w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption id=\"caption-attachment-46\" class=\"wp-caption-text\"><strong>Figure 3.3.<\/strong> Selectors and styles for creating borders and drop shadows around images and drop caps for text.<\/figcaption><\/figure>\n<p><strong>Images.<\/strong> Images, like the one shown in <span style=\"color: #ff0000\"><strong>Figure 3.3<\/strong><\/span>, can have borders applied using the \u201cborder\u201d style, with specifications for width, line type, and colour. A drop-shadow can also be applied using the \u201cbox-shadow\u201d style, which is similar to text-shadow described above. (Not all platforms, eReader apps, and eReaders may support the drop-shadow style.)<\/p>\n<p><strong>Small caps.<\/strong> These are smaller uppercase letters at the beginning of a chapter or section (<span style=\"color: #ff0000\"><strong>Figure 3.4<\/strong><\/span>), often following a drop-cap. Small caps can be created by selecting the desired region of text with opening and closing &lt;span&gt; tags, then setting the \u201cfont-variant: small-caps\u201d style.<\/p>\n<figure id=\"attachment_52\" aria-describedby=\"caption-attachment-52\" style=\"width: 512px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid gray\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/small-caps.jpg\" alt=\"\" width=\"512\" height=\"179\" class=\"wp-image-52\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/small-caps.jpg 794w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/small-caps-300x105.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/small-caps-768x269.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/small-caps-65x23.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/small-caps-225x79.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/small-caps-350x123.jpg 350w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><figcaption id=\"caption-attachment-52\" class=\"wp-caption-text\"><strong>Figure 3.4.<\/strong> Example of small caps set with the \u201cfont-variant\u201d style.<\/figcaption><\/figure>\n<p><strong>Sidebars.<\/strong> Sidebars are boxes with ancillary information relating to the current chapter or section (<span style=\"color: #ff0000\"><strong>Figure 3.5<\/strong><\/span>). Sidebars can be created by inserting one styled &lt;p&gt; tag, or if more than one paragraph, a &lt;div&gt; or division tag. The sidebar can then be styled with the \u201cborder\u201d and \u201cbackground\u201d styles.<\/p>\n<figure id=\"attachment_50\" aria-describedby=\"caption-attachment-50\" style=\"width: 768px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid gray\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/sidebar-1024x329.jpg\" alt=\"\" width=\"768\" height=\"247\" class=\"wp-image-50\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/sidebar-1024x329.jpg 1024w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/sidebar-300x96.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/sidebar-768x247.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/sidebar-65x21.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/sidebar-225x72.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/sidebar-350x113.jpg 350w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/sidebar.jpg 1960w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><figcaption id=\"caption-attachment-50\" class=\"wp-caption-text\"><strong>Figure 3.5.<\/strong> Example of a sidebar with coloured background and border with rounded corners (border-radius).<\/figcaption><\/figure>\n<p><strong>Pull quotes.<\/strong> These are one or more sentences or phrases taken from the text that are set in much larger type in order to add interest to the text (<span style=\"color: #ff0000\"><strong>Figure 3.6<\/strong><\/span>). A pull quote can be created by especially styling a &lt;p&gt; paragraph tag, or using a &lt;div&gt; division. The text can be set to a larger font and with quote marks if appropriate.<\/p>\n<figure id=\"attachment_49\" aria-describedby=\"caption-attachment-49\" style=\"width: 768px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid gray\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/pull-quote-1024x315.jpg\" alt=\"\" width=\"768\" height=\"236\" class=\"wp-image-49\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/pull-quote-1024x315.jpg 1024w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/pull-quote-300x92.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/pull-quote-768x236.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/pull-quote-65x20.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/pull-quote-225x69.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/pull-quote-350x108.jpg 350w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2018\/05\/pull-quote.jpg 1964w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><figcaption id=\"caption-attachment-49\" class=\"wp-caption-text\"><strong>Figure 3.065.<\/strong> Example of a pull-quote.<\/figcaption><\/figure>\n","protected":false},"author":6,"menu_order":3,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["richardadams"],"pb_section_license":""},"chapter-type":[],"contributor":[57],"license":[],"class_list":["post-35","chapter","type-chapter","status-publish","hentry","contributor-richardadams"],"part":178,"_links":{"self":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapters\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/wp\/v2\/users\/6"}],"version-history":[{"count":24,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapters\/35\/revisions"}],"predecessor-version":[{"id":533,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapters\/35\/revisions\/533"}],"part":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/parts\/178"}],"metadata":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapters\/35\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/wp\/v2\/media?parent=35"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapter-type?post=35"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/wp\/v2\/contributor?post=35"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/wp\/v2\/license?post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}