The HTML Ebook Pages

Posted Oct 08, 2009 by Chrys / comments 0 comments / Print / Font Size Decrease font size Increase font size

In this part of the series we look at the HTML pages for the HTML ebook project.

HTML Ebook - Part 4

Introduction
This is part 4 of my series, HTML Ebook. In this part of the series we look at the HTML pages for the HTML ebook project. The information I give you for the code samples in this part of the series are for illustrative purpose only. In your commercial project there will be practical information for the HTML pages.

Note: If you cannot see the code or if you think anything is missing in this article (broken link, image absent), just contact me at forchatrans@yahoo.com. That is, contact me for the slightest problem you have about what you are reading.

The HTML Head and Body Elements
All HTML pages except the banner and sidebar pages will go into the content frame of the frameset. Each of these pages has the HTML BODY element. Each of these pages has the HTML HEAD element. The Head element of each of these pages has the TITLE element and a META description tag. The Title tag has the title of the page. The Meta description tag has the description of the page's information (content).

Non-Chapter Pages
The non-chapter pages are the Cover page, the Table of Contents page, the Forward page, the Acknowledgement page and the Index page.

We shall now look at the code for the different pages.

Table of Contents Page
The Table of Contents page mainly has to HTML Ordered Lists for the table of contents. Each item of the table of contents is a link that will lead you to its page.

The HTML Lists
In the Table of Contents the non-chapter pages are numbered with lower roman numbers, while the chapters are numbered with decimals. There are two HTML Ordered Lists: one for the non-chapter pages and the other for the chapter pages.

This is the one for the non-chapter pages:


  1. Cover

  2. Table of Contents

  3. Forward

  4. Acknowledgement

The Ordered List for the chapters has nested Ordered Lists. The numbering for the outer list is decimal and does not have leading zeros. The numbering for the nested lists is also decimal but has leading zeros. The outer list is for the chapters while the nested lists are for the sections of the chapters.

The is the outer list without the nested lists:


  1. Chapter 1

  2. Chapter 2

  3. Chapter 3

Here is the complete list for the chapters:


  1. Chapter 1
  2. Chapter 1 - Section 1

  3. Chapter 1 - Section 2

  4. Chapter 1 - Section 3

  • Chapter 2
  • Chapter 2 - Section 1
  • Chapter 2 - Section 2
  • Chapter 2 - Section 3
  • Chapter 3
  • Chapter 3 - Section 1
  • Chapter 3 - Section 2
  • Chapter 3 - Section 3
  • Index

  • Just note that for convenience, I included the index page link with the chapter List and not the non-Chapter page List.

    At the end of this series, you will have a link for the complete code, which would include the complete code for the Table of Contents page.

    Numbering
    I have numbered the entries of the table of contents in a very simple way. If you want a more convenient way of numbering the entries of the table of content and in chapters, then learn CSS Automatic Counters and Numbering.

    The Cover Page
    This is the code for the Cover page:

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


    Cover

    Title of Book
    by

    Name of Author


    Name of Publisher

    Publisher's Address line 1

    Publisher's Address line 1

    Publisher's Address line 1

    Publisher's Address line 1


    Year Published


    The Forward Page
    The is the code for the forward page:

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


    Forward

    In this page, the author gives the reasons why he writes the ebook: what purpose the ebook will be used for and what people will gain when they read the ebook.


    The Acknowledgement Page
    This is the code for the acknowledgement page:

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


    Forward

    In this page, the author list and thank the people and institutions that help him to produce the book.


    Chapters
    A chapter starts with some introduction or a kind of overview to the chapter information. In this case, the HTML page for the chapter introduction (overview) will be different from that of the first section of the chapter. This would lead to a chapter having four pages and not three.

    Chapter 1 Introductory Page
    Below is the introductory page for chapter 1. The name of this file is Chapter1.htm and it is in the head directory.

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


    Chapter 1 - Its title

    The introductory information for chapter 1 and any images go here.


    Chapter 1-Section 1
    Below is the Chapter 1-Section 1 page. The name of this file is Chapter1-Section1.htm and it is in the Chapter1 directory, which is an immediate sub directory to the head directory.

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


    Chapter 1 - Section 1- Its title

    Information and any images for chapter 1 - section 1 go here.


    Chapter 1-Section 2
    Below is the Chapter 1-Section 2 page. The name of this file is Chapter1-Section2.htm and it is in the Chapter1 directory, which is an immediate sub directory to the head directory.

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


    Chapter 1 - Section 2- Its title

    Information and any images for chapter 1 - section 2 go here.


    Chapter 1-Section 3
    Below is the Chapter 1-Section 3 page. The name of this file is Chapter1-Section3.htm and it is in the Chapter1 directory, which is an immediate sub directory to the head directory.

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


    Chapter 1 - Section 3- Its title

    Information and any images for chapter 1 - section 3 go here.


    The Pages for the other Chapters
    The pages for the other chapters are defined similarly to those of chapter 1.

    The Index Page
    The index page consists of important words from all the chapters arranged in alphabetical order. Each of these words is a hyperlink to the page (position of the page) that has the word. I will not give you the code for this page; I leave that as an exercise for you.

    The main thing you have to do for this is to arrange the words in alphabetical order (you can use a spreadsheet such as Excel for this) and then, for the HTML index page you make each word a hyperlink to the page that has the word, targeting (with the A target attribute) the content frame of the frameset.

    That is it for this chapter. We take a break here and continue in the next part of the series.

    Chrys

    Rate this Article:

    Be the first to rate me.


    * You must be logged in order to leave comments, please login or join us.

    Comments

    No comments yet.



    Bookmark and Share
    Sign up for our email newsletter
    Name:
    Email: