Creating an e-book. Part 3.

Continuing the series about how to create an e-book. Today we’ll have a much shorter post. Specifically, we’ll look at how to create the Title page.

So, what is a Title Page? According to dictionary.com, Title Page is: “the page at the beginning of a volume that indicates the title, author’s or editor’s name, and the publication information, usually the publisher and the place and date of publication.”

If you’ll search Google Images for “title page”, you see lots of examples of how a Title Page looks like. And, it seems to be the easiest to create. Technically speaking, a bunch of paragraphs and that’s it.

Ok, following dictionary.com’s description, let’s create our Title Page. We will need the following:

  • Book title: I will use “My Book’s Title”
  • Author name: this is simple, “Vitalie Ciobanu”
  • Publisher info: I do not have one so I will use “Lorem Ipsum Publishing Inc.”
  • Place and date of publication: “Madagascar 2018”. I still want to visit this island…

Open mybook.html page in Notepad and add above details right before your first chapter (which should be <h2> tag); each detail on different row and inside a paragraph element (<p></p>). Here is my <body> element now (trimmed):

<br />
&lt;body&gt;My Book's Title</p>
<p>Vitalie Ciobanu</p>
<p>Lorem Ipsum Publishing. All rights reserved.</p>
<p>Madagascar 2018<br />
&lt;h2&gt;Lorem Ipsum&lt;/h2&gt;<br />
&lt;h3&gt;What is Lorem Ipsum?&lt;/h3&gt;<br />
&lt;p class=&quot;first&quot;&gt;Lorem ipsum dolor sit….&lt;/p&gt;<br />
&lt;p class=&quot;quote&quot;&gt;Nullam tortor orci…..&lt;/p&gt;</p>
<p>Curabitur ligula tortor, ullamcorper….</p>
<p>&lt;/body&gt;<br />

And here’s my page viewed in a browser:

Because we have p selector defined in our stylesheet file, you see above we have some formatting applied already. Let’s add additional selectors to the stylesheet to make Title page information differently looking. So, let’s add some different formatting for book title, author, publisher and date of publication. Here’s just some basic CSS added to my epub.css file:

<br />
p.booktitle {<br />
    text-indent:0em;<br />
    text-align:center;<br />
    margin-top:5em;<br />
    font-weight:bold;<br />
    font-size:150%;<br />
}</p>
<p>p.bookauthor {<br />
    text-indent:0em;<br />
    text-align:center;<br />
    margin-top:1em;<br />
    font-weight:bold;<br />
    font-size:130%;<br />
}</p>
<p>p.bookpublisher {<br />
    text-indent:0em;<br />
    text-align:center;<br />
    margin-top:3em;<br />
    font-weight:bold;<br />
    font-size:100%;<br />
}</p>
<p>p.bookpublished {<br />
    text-indent:0em;<br />
    text-align:center;<br />
    margin-top:1em;<br />
    font-weight:bold;<br />
    font-size:100%;<br />
}<br />

For each selector I wanted no indentation so I added “text-indent:0em”. Also, everything is centered and bold. Font size is different, with Book Title being the biggest one, 150%em. Lastly, I added different top margins to visibly separate each line. Afterwards, I updated the class details on my newly added paragraphs in html file.

<br />
&lt;body&gt;<br />
&lt;p class=&quot;booktitle&quot;&gt;My Book's Title&lt;/p&gt;<br />
&lt;p class=&quot;bookauthor&quot;&gt;Vitalie Ciobanu&lt;/p&gt;<br />
&lt;p class=&quot;bookpublisher&quot;&gt;Lorem Ipsum Publishing. All rights reserved.&lt;/p&gt;<br />
&lt;p class=&quot;bookpublished&quot;&gt;Madagascar 2018&lt;/p&gt;</p>
<p>&lt;h2&gt;Lorem Ipsum&lt;/h2&gt;<br />
&lt;h3&gt;What is Lorem Ipsum?&lt;/h3&gt;<br />
&lt;p class=&quot;first&quot;&gt;Lorem ipsum dolor sit….&lt;/p&gt;<br />
&lt;p class=&quot;quote&quot;&gt;Nullam tortor orci…..&lt;/p&gt;</p>
<p>Curabitur ligula tortor, ullamcorper….</p>
<p>&lt;/body&gt;<br />

Here’s the updated view in browser.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.