{"id":244,"date":"2020-04-12T23:06:54","date_gmt":"2020-04-12T23:06:54","guid":{"rendered":"https:\/\/pressbooks.library.ryerson.ca\/ebooks\/chapter\/tutorial-2a-%e2%80%a2-web-based-ebook\/"},"modified":"2021-07-19T18:05:59","modified_gmt":"2021-07-19T18:05:59","slug":"tutorial-3-web-based-ebook","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/chapter\/tutorial-3-web-based-ebook\/","title":{"raw":"Tutorial 3 \u2022 Web-Based eBook","rendered":"Tutorial 3 \u2022 Web-Based eBook"},"content":{"raw":"<p class=\"import-ListBullet\">A manually-created, web-based eBook may be a good solution for short books of, say, 6 pages or less. We will be using this web eBook to demonstrate HTML tags and CSS styles that are useful for creating special effects when editing the XHTML in eBooks.<\/p>\r\n\r\n<h2>Orientation to the Web Page<\/h2>\r\n<ol>\r\n \t<li>Open Dreamweaver or a free HTML editor, then open the HTML file for the web eBook. Note how the page has been designed with a fixed layout that looks like an 8.5x11\" page.<\/li>\r\n \t<li>If you're new to HTML, note the use of the tags to mark all the sections and text, including &lt;p&gt; paragraph, &lt;h1&gt; to &lt;h6&gt; headings, &lt;img&gt; image, and &lt;div&gt; division for objects and grouping other tags.<\/li>\r\n \t<li>Also note the &lt;style&gt; tag in the &lt;head&gt; of the document and how it is used to select specific tags and apply specific styles. Tags can be selected by their tag type or by labeling them with an ID (used once per page) or class (used multiple times in a page).<\/li>\r\n<\/ol>\r\n<table class=\" aligncenter\">\r\n<tbody>\r\n<tr class=\"TableGrid-R\">\r\n<td class=\"TableGrid-C\" style=\"background-color: #c6d9f1;border-top: dotted windowtext 0.5pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\" colspan=\"2\">\r\n<p class=\"import-ListBullet\"><strong>HTML <\/strong><strong>T<\/strong><strong>ags for <\/strong><strong>ePub<\/strong><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\"><strong>&lt;p&gt;<\/strong><\/p>\r\n<p class=\"import-ListBullet\"><strong>&lt;h1&gt;\u2026&lt;h6&gt;<\/strong><\/p>\r\n<p class=\"import-ListBullet\"><strong>&lt;img&gt;<\/strong><\/p>\r\n<p class=\"import-ListBullet\"><strong>&lt;figcaption&gt;<\/strong><\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\">paragraph<\/p>\r\n<p class=\"import-ListBullet\">heading 1 (largest) to heading 6 (smallest)<\/p>\r\n<p class=\"import-ListBullet\">image, e.g., &lt;img src=\"imagename.jpg\" \/&gt;<\/p>\r\n<p class=\"import-ListBullet\">caption<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<table class=\" aligncenter\">\r\n<tbody>\r\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\r\n<td class=\"TableGrid-C\" style=\"background-color: #c6d9f1;border-top: dotted windowtext 0.5pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\" colspan=\"3\">\r\n<p class=\"import-ListBullet\"><strong>HTML Identifiers for CSS Styling<\/strong><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\"><strong>Identifier<\/strong><\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"padding: 0pt 5.4pt 0pt 5.4pt;border: none windowtext 0pt\">\r\n<p class=\"import-ListBullet\"><strong>Example in HTML<\/strong><\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\"><strong>Selector in CSS<\/strong><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\"><strong>tag, e.g., &lt;p&gt;<\/strong><\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"padding: 0pt 5.4pt 0pt 5.4pt;border: none windowtext 0pt\">\r\n<p class=\"import-ListBullet\">&lt;p&gt;<\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\">p<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\"><strong>ID<\/strong><\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"padding: 0pt 5.4pt 0pt 5.4pt;border: none windowtext 0pt\">\r\n<p class=\"import-ListBullet\">&lt;p id=\"first-para\"&gt;<\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\">#first-para<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt;background: none\">\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\"><strong>class<\/strong><\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: none windowtext 0pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\">&lt;img class=\"body-fig\"&gt;<\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\">.body-fig<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<table class=\" aligncenter\">\r\n<tbody>\r\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt;background: none\">\r\n<td class=\"TableGrid-C\" style=\"background-color: #c6d9f1;border-top: dotted windowtext 0.5pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\" colspan=\"2\">\r\n<p class=\"import-ListBullet\"><strong>Styles for Text and Images<\/strong><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt;background: none\">\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\"><em>text<\/em><\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\"><em>image<\/em><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt;background: none\">\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\">font-family:<\/p>\r\n<p class=\"import-ListBullet\">font-size:<\/p>\r\n<p class=\"import-ListBullet\">font-style:<\/p>\r\n<p class=\"import-ListBullet\">font-weight:<\/p>\r\n<p class=\"import-ListBullet\">line-height:<\/p>\r\n<p class=\"import-ListBullet\">color:<\/p>\r\n<\/td>\r\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\r\n<p class=\"import-ListBullet\">width:<\/p>\r\n<p class=\"import-ListBullet\">height:<\/p>\r\n<p class=\"import-ListBullet\">float:<\/p>\r\n<p class=\"import-ListBullet\">margin:<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h2>Creative Styles<\/h2>\r\nLet's apply some creative styles to the web eBook.\r\n<h2>1. Decorative Title Font<\/h2>\r\nFind a decorative Truetype font on google.com\/fonts, such as the font \u201cRye\u201d in the screen capture. Add the .ttf file to the web page folder and bring it into the page by adding an @font-face rule to the &lt;style&gt; statement:\r\n<pre>  @font-face {\r\n\r\n      font-family: Rye;\r\n\r\n      src: url(\"Rye-Regular.ttf\");\r\n\r\n      }<\/pre>\r\nIn the style sheet, specify the font for the &lt;h1&gt; tag:\r\n<pre>  h1 {\r\n      font-family: Rye;\r\n     }<\/pre>\r\n<h2>2.\u00a0Drop Cap<\/h2>\r\nFor the drop cap, enclose the first letter in a &lt;span&gt; tag, then style the span so the letter is 3 times normal size (3em or 300%), float left, and put the required margin around it. You could also use a different font. If drop cap has too much space at the bottom, e.g., it\u2019s only 2 lines high but occupies 3 lines, you could move the third line up using negative margin.d\r\n<pre>  span {\r\n     font-size: 3em;\r\n     float: left;\r\n     margin: 0 6px -3px 0;\r\n     }\r\n<\/pre>\r\n<h2>3.\u00a0Image with Text Wrap<\/h2>\r\nPlace the image of the whale caricature into the page using the &lt;img&gt; tag. Label the &lt;img&gt; tag with a class, like &lt;img class=\"left-float\"&gt;, because you will want to style other images differently. Style the .left-float class to the width that you want and float: left;, then add margin to create space around the image. Other suitable image styles include border and box-shadow (the box-shadow style will be deleted if used in Pressbooks).\r\n<pre>  .left-float {\r\n     width: 512px;\r\n     float: left;\r\n     margin: 0 12px 6px 0;\r\n     border: 1px solid dimgray;\r\n     box-shadow: 3px 2px 6px gray;\r\n     }<\/pre>\r\n<h2>4.\u00a0Full-Width Image<\/h2>\r\nPlace the drawing of the whale into one column. Set width to occupy the whole column. You can also add a border and a drop shadow (text-shadow) to the image.\r\n<h2>5. Callout or Pull Quote<\/h2>\r\nA callout or pull quote is a sentence or phrase from the text that's set in larger type. It breaks up the text and calls attention to phrase in question. To create a callout, enclose the text in &lt;span&gt; or &lt;div&gt; tags, or in a &lt;p&gt; paragraph with a unique ID or class, set to the width of the column, and specify font-family and font-size. Use margin and padding to make space around and text inset.\r\n\r\nIn the sample callout and sidebars shown in the Moby Dick web-based eBook, the columns are 396px wide so the callout and sidebar paragraphs were set to 324px. The paragraph was centered in the column with the style \"margin: 0 auto;\" and font size, background, and border were also specified.\r\n<h2>6. Sidebar<\/h2>\r\nA sidebar presents short information that's an aside to the main story. It also breaks up the text and adds interest. Set up similar to a callout or pull quote.\r\n<table style=\"border-collapse: collapse;border: none;width: 100%;background: none\">\r\n<tbody>\r\n<tr style=\"border: none\">\r\n<td style=\"width: 50.03773584905661%\"><a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1.jpg\"><img src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1-792x1024.jpg\" alt=\"\" width=\"384\" height=\"497\" class=\"alignright wp-image-264\" \/><\/a><\/td>\r\n<td style=\"width: 50.03773584905661%\"><a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2.jpg\"><img src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2-793x1024.jpg\" alt=\"\" width=\"384\" height=\"496\" class=\"wp-image-265 alignleft\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p style=\"font-size: 12pt;text-align: center\">Example of a <a href=\"http:\/\/stw.ryerson.ca\/~r3adams\/gcm802\/web-book\/web-book-illus.html\">2-page web-based eBook<\/a> with special effects.<\/p>\r\n&nbsp;\r\n\r\n[caption id=\"attachment_416\" align=\"aligncenter\" width=\"1024\"]<a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general.jpg\"><img src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general.jpg\" alt=\"\" width=\"1024\" height=\"663\" class=\"wp-image-416 size-full\" \/><\/a> Page structure of the web-based eBook, showing the div element \"page\" that creates the page and the div element \"text\" for the text.[\/caption]\r\n\r\n&nbsp;\r\n\r\n[caption id=\"attachment_414\" align=\"aligncenter\" width=\"1024\"]<a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1.jpg\"><img src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1.jpg\" alt=\"\" width=\"1024\" height=\"663\" class=\"wp-image-414 size-full\" \/><\/a> XHTML tags and CSS code for the drop-cap, callout, full-width image, and image with text wrap.[\/caption]\r\n\r\n&nbsp;\r\n\r\n[caption id=\"attachment_415\" align=\"aligncenter\" width=\"1024\"]<a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2.jpg\"><img src=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2.jpg\" alt=\"\" width=\"1024\" height=\"663\" class=\"wp-image-415 size-full\" \/><\/a> Page 2 of the web eBook with code for the sidebar.[\/caption]\r\n\r\n&nbsp;\r\n<h2>Instructional Video<\/h2>\r\n[embed]https:\/\/youtu.be\/7r6AjDTxXSk[\/embed]","rendered":"<p class=\"import-ListBullet\">A manually-created, web-based eBook may be a good solution for short books of, say, 6 pages or less. We will be using this web eBook to demonstrate HTML tags and CSS styles that are useful for creating special effects when editing the XHTML in eBooks.<\/p>\n<h2>Orientation to the Web Page<\/h2>\n<ol>\n<li>Open Dreamweaver or a free HTML editor, then open the HTML file for the web eBook. Note how the page has been designed with a fixed layout that looks like an 8.5&#215;11&#8243; page.<\/li>\n<li>If you&#8217;re new to HTML, note the use of the tags to mark all the sections and text, including &lt;p&gt; paragraph, &lt;h1&gt; to &lt;h6&gt; headings, &lt;img&gt; image, and &lt;div&gt; division for objects and grouping other tags.<\/li>\n<li>Also note the &lt;style&gt; tag in the &lt;head&gt; of the document and how it is used to select specific tags and apply specific styles. Tags can be selected by their tag type or by labeling them with an ID (used once per page) or class (used multiple times in a page).<\/li>\n<\/ol>\n<table class=\"aligncenter\">\n<tbody>\n<tr class=\"TableGrid-R\">\n<td class=\"TableGrid-C\" style=\"background-color: #c6d9f1;border-top: dotted windowtext 0.5pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\" colspan=\"2\">\n<p class=\"import-ListBullet\"><strong>HTML <\/strong><strong>T<\/strong><strong>ags for <\/strong><strong>ePub<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\"><strong>&lt;p&gt;<\/strong><\/p>\n<p class=\"import-ListBullet\"><strong>&lt;h1&gt;\u2026&lt;h6&gt;<\/strong><\/p>\n<p class=\"import-ListBullet\"><strong>&lt;img&gt;<\/strong><\/p>\n<p class=\"import-ListBullet\"><strong>&lt;figcaption&gt;<\/strong><\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\">paragraph<\/p>\n<p class=\"import-ListBullet\">heading 1 (largest) to heading 6 (smallest)<\/p>\n<p class=\"import-ListBullet\">image, e.g., &lt;img src=&#8221;imagename.jpg&#8221; \/&gt;<\/p>\n<p class=\"import-ListBullet\">caption<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"aligncenter\">\n<tbody>\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\n<td class=\"TableGrid-C\" style=\"background-color: #c6d9f1;border-top: dotted windowtext 0.5pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\" colspan=\"3\">\n<p class=\"import-ListBullet\"><strong>HTML Identifiers for CSS Styling<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\"><strong>Identifier<\/strong><\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"padding: 0pt 5.4pt 0pt 5.4pt;border: none windowtext 0pt\">\n<p class=\"import-ListBullet\"><strong>Example in HTML<\/strong><\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\"><strong>Selector in CSS<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\"><strong>tag, e.g., &lt;p&gt;<\/strong><\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"padding: 0pt 5.4pt 0pt 5.4pt;border: none windowtext 0pt\">\n<p class=\"import-ListBullet\">&lt;p&gt;<\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\">p<\/p>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt\">\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\"><strong>ID<\/strong><\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"padding: 0pt 5.4pt 0pt 5.4pt;border: none windowtext 0pt\">\n<p class=\"import-ListBullet\">&lt;p id=&#8221;first-para&#8221;&gt;<\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\">#first-para<\/p>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt;background: none\">\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\"><strong>class<\/strong><\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: none windowtext 0pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\">&lt;img class=&#8221;body-fig&#8221;&gt;<\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\">.body-fig<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"aligncenter\">\n<tbody>\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt;background: none\">\n<td class=\"TableGrid-C\" style=\"background-color: #c6d9f1;border-top: dotted windowtext 0.5pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\" colspan=\"2\">\n<p class=\"import-ListBullet\"><strong>Styles for Text and Images<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt;background: none\">\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\"><em>text<\/em><\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: none windowtext 0pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\"><em>image<\/em><\/p>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 10.8pt;background: none\">\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: none windowtext 0pt;border-left: dotted windowtext 0.5pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\">font-family:<\/p>\n<p class=\"import-ListBullet\">font-size:<\/p>\n<p class=\"import-ListBullet\">font-style:<\/p>\n<p class=\"import-ListBullet\">font-weight:<\/p>\n<p class=\"import-ListBullet\">line-height:<\/p>\n<p class=\"import-ListBullet\">color:<\/p>\n<\/td>\n<td class=\"TableGrid-C\" style=\"border-top: none windowtext 0pt;border-bottom: dotted windowtext 0.5pt;border-right: dotted windowtext 0.5pt;border-left: none windowtext 0pt;padding: 0pt 5.4pt 0pt 5.4pt\">\n<p class=\"import-ListBullet\">width:<\/p>\n<p class=\"import-ListBullet\">height:<\/p>\n<p class=\"import-ListBullet\">float:<\/p>\n<p class=\"import-ListBullet\">margin:<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Creative Styles<\/h2>\n<p>Let&#8217;s apply some creative styles to the web eBook.<\/p>\n<h2>1. Decorative Title Font<\/h2>\n<p>Find a decorative Truetype font on google.com\/fonts, such as the font \u201cRye\u201d in the screen capture. Add the .ttf file to the web page folder and bring it into the page by adding an @font-face rule to the &lt;style&gt; statement:<\/p>\n<pre>  @font-face {\r\n\r\n      font-family: Rye;\r\n\r\n      src: url(\"Rye-Regular.ttf\");\r\n\r\n      }<\/pre>\n<p>In the style sheet, specify the font for the &lt;h1&gt; tag:<\/p>\n<pre>  h1 {\r\n      font-family: Rye;\r\n     }<\/pre>\n<h2>2.\u00a0Drop Cap<\/h2>\n<p>For the drop cap, enclose the first letter in a &lt;span&gt; tag, then style the span so the letter is 3 times normal size (3em or 300%), float left, and put the required margin around it. You could also use a different font. If drop cap has too much space at the bottom, e.g., it\u2019s only 2 lines high but occupies 3 lines, you could move the third line up using negative margin.d<\/p>\n<pre>  span {\r\n     font-size: 3em;\r\n     float: left;\r\n     margin: 0 6px -3px 0;\r\n     }\r\n<\/pre>\n<h2>3.\u00a0Image with Text Wrap<\/h2>\n<p>Place the image of the whale caricature into the page using the &lt;img&gt; tag. Label the &lt;img&gt; tag with a class, like &lt;img class=&#8221;left-float&#8221;&gt;, because you will want to style other images differently. Style the .left-float class to the width that you want and float: left;, then add margin to create space around the image. Other suitable image styles include border and box-shadow (the box-shadow style will be deleted if used in Pressbooks).<\/p>\n<pre>  .left-float {\r\n     width: 512px;\r\n     float: left;\r\n     margin: 0 12px 6px 0;\r\n     border: 1px solid dimgray;\r\n     box-shadow: 3px 2px 6px gray;\r\n     }<\/pre>\n<h2>4.\u00a0Full-Width Image<\/h2>\n<p>Place the drawing of the whale into one column. Set width to occupy the whole column. You can also add a border and a drop shadow (text-shadow) to the image.<\/p>\n<h2>5. Callout or Pull Quote<\/h2>\n<p>A callout or pull quote is a sentence or phrase from the text that&#8217;s set in larger type. It breaks up the text and calls attention to phrase in question. To create a callout, enclose the text in &lt;span&gt; or &lt;div&gt; tags, or in a &lt;p&gt; paragraph with a unique ID or class, set to the width of the column, and specify font-family and font-size. Use margin and padding to make space around and text inset.<\/p>\n<p>In the sample callout and sidebars shown in the Moby Dick web-based eBook, the columns are 396px wide so the callout and sidebar paragraphs were set to 324px. The paragraph was centered in the column with the style &#8220;margin: 0 auto;&#8221; and font size, background, and border were also specified.<\/p>\n<h2>6. Sidebar<\/h2>\n<p>A sidebar presents short information that&#8217;s an aside to the main story. It also breaks up the text and adds interest. Set up similar to a callout or pull quote.<\/p>\n<table style=\"border-collapse: collapse;border: none;width: 100%;background: none\">\n<tbody>\n<tr style=\"border: none\">\n<td style=\"width: 50.03773584905661%\"><a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1-792x1024.jpg\" alt=\"\" width=\"384\" height=\"497\" class=\"alignright wp-image-264\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1-792x1024.jpg 792w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1-232x300.jpg 232w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1-768x993.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1-65x84.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1-225x291.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1-350x453.jpg 350w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page1.jpg 1024w\" sizes=\"auto, (max-width: 384px) 100vw, 384px\" \/><\/a><\/td>\n<td style=\"width: 50.03773584905661%\"><a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2-793x1024.jpg\" alt=\"\" width=\"384\" height=\"496\" class=\"wp-image-265 alignleft\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2-793x1024.jpg 793w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2-232x300.jpg 232w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2-768x992.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2-65x84.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2-225x290.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2-350x452.jpg 350w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/DW-W_page2.jpg 1024w\" sizes=\"auto, (max-width: 384px) 100vw, 384px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"font-size: 12pt;text-align: center\">Example of a <a href=\"http:\/\/stw.ryerson.ca\/~r3adams\/gcm802\/web-book\/web-book-illus.html\">2-page web-based eBook<\/a> with special effects.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_416\" aria-describedby=\"caption-attachment-416\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general.jpg\" alt=\"\" width=\"1024\" height=\"663\" class=\"wp-image-416 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general.jpg 1024w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general-300x194.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general-768x497.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general-65x42.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general-225x146.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-general-350x227.jpg 350w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-416\" class=\"wp-caption-text\">Page structure of the web-based eBook, showing the div element &#8220;page&#8221; that creates the page and the div element &#8220;text&#8221; for the text.<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_414\" aria-describedby=\"caption-attachment-414\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1.jpg\" alt=\"\" width=\"1024\" height=\"663\" class=\"wp-image-414 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1.jpg 1024w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1-300x194.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1-768x497.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1-65x42.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1-225x146.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p1-350x227.jpg 350w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-414\" class=\"wp-caption-text\">XHTML tags and CSS code for the drop-cap, callout, full-width image, and image with text wrap.<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_415\" aria-describedby=\"caption-attachment-415\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/pressbooks.library.ryerson.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2.jpg\" alt=\"\" width=\"1024\" height=\"663\" class=\"wp-image-415 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2.jpg 1024w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2-300x194.jpg 300w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2-768x497.jpg 768w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2-65x42.jpg 65w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2-225x146.jpg 225w, https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-content\/uploads\/sites\/38\/2020\/04\/web-ebook-p2-350x227.jpg 350w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-415\" class=\"wp-caption-text\">Page 2 of the web eBook with code for the sidebar.<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h2>Instructional Video<\/h2>\n<p><iframe loading=\"lazy\" id=\"oembed-1\" title=\"GCM 802 \u2022 Tutorial 3 \u2022 Web-Based eBooks with HTML and CSS\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/7r6AjDTxXSk?feature=oembed&#38;rel=0\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\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-244","chapter","type-chapter","status-publish","hentry","contributor-richardadams"],"part":175,"_links":{"self":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapters\/244","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":35,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapters\/244\/revisions"}],"predecessor-version":[{"id":539,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapters\/244\/revisions\/539"}],"part":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/parts\/175"}],"metadata":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapters\/244\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/wp\/v2\/media?parent=244"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/pressbooks\/v2\/chapter-type?post=244"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/wp\/v2\/contributor?post=244"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ebooks\/wp-json\/wp\/v2\/license?post=244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}