The Head, Body and HTML elements
Odds are you won’t even touch these elements when kindle formatting, however it is important that you are aware of their location and function.
The <head> element:
The <head> element is a container for all the head elements, including scripts, style sheet location, meta information, and more.
The following tags can be added to the head section: <title>, <style>, <meta>, <link>, <script>, <noscript>, and <base>.
The HTML <title> element
The <title> element is required in all HTML/XHTML documents. The <title> tag defines the title of a webpage document. While the <title> tag is required on every ebook HTML page, adding specific information (such as the page title) is not.
The actual title of the page is obtained from the META DATA content.opf file. I will discuss this more later in the book.
The HTML <link> element
The <link> tag defines the relationship between a document and resource outside the HTML page. It is commonly used to apply style sheets to a page.
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
The HTML <style> element
The <style> tag is used to define style information for the HTML document. The styles are applied only to the page the <style> elements reside on.
Inside the style element are specifications on how HTML elements are rendered in an ebook.
This is not the best way to apply styles. Should you need to make a change, then it would require making identical changes on multiple pages. Using an external style sheet (CSS) if far more effective to making book-wide changes to styles and formatting. (See HTML Styles)
<head>
<style type="text/css">
body {background-color:yellow}
p {color:blue}
</style>
</head>
The <body> element:
The body element <body> defines the body of the HTML document. The body element has a start tag <body> and an end tag </body> and the element content for the body are other HTML elements such as <p> or <h1>.
This means that between the opening and closing body tags is the text, photos, audio files—everything that makes up your novel.
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph, too.</p>
</body>
The <html> element:
The html element defines the entire HTML document. Between the opening and closing html tags are all html elements.
<html>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph, too.</p>
</body>
</html>
You can see the structure is actually quite simple. The document is defined as an HTML <html> and you include the content or body of your novel using other elements.
Feel free to comment / ask questions…I am here to help.
NEXT: HTML Element Syntax: the elements that make up the design and formatting of your book / novel.
Excerpt from Kindle Formatting Solutions: Basic HTML & CSS for ePublishing Authors Coming October 2013
Additional Resources
List of HTML5 tags compatible with Amazon Kindle