EBook HTML

From MobileRead
Jump to: navigation, search

This document captures the early HTML usage in eBooks. It captures the format documentation for MOBI and OEB usage to preserve it.

[edit] Overview

eBooks have used HTML format for a long time as the basis for describing formatting and presentation of eBook content. Today, a variation called XHTML has superseded this document. It provides more structure to the content but is otherwise compatible with this description. The attributes described here are now done using CSS. Not all of the tags shown here are supported by all eBook Readers. This is based on HTML versions 3.2 and 4.0.

[edit] Basic HTML

HTML Tag Attributes Description Mobipocket Reader OEB 1.0
<?xml?>   This tag identifies a document as an XML document Yes Yes
<?xml-stylesheet?> Specifies the presence of an external stylesheet No Yes
<!-- -->   Comment Yes Yes
<!doctype>   Used to reference a DTD Ignored Yes
<a>   Creates an anchor point or target point for hyperlinking Yes Yes
class No Yes
href Yes Yes
id Yes Yes
name Yes Dep.
rel Ignored Yes
rev Ignored Yes
style No Yes
title No Yes
onclick May contain some JavaScript code Yes No
<area>   Creates a link hotspot within an image No Yes
alt Yes
coords Yes
href Yes
nohref Yes
shape Yes
title Yes
<b>   Makes the enclosed text bold Yes Yes
class No Yes
id Yes Yes
style No Yes
title No Yes
<base>   Establishes a base file path for hyperlinks No Yes
href Yes
<big>   Makes the enclosed text one font size larger than the current or default font size Yes Yes
<blockquote>   Generates a 1-em margin above the text it encloses Yes Yes
cite Ignored Yes
class No Yes
id Yes Yes
style No Yes
title No Yes
<body>   Encloses the body text of an eBook source file Yes Yes
topmargin,
leftmargin,
rightmargin,
bottommargin
Yes No
bgcolor No Dep.
class No Yes
Id No Yes
style No Yes
text No Dep.
title No Yes
<br />   Generates a line break of a size equal to the current line-height Yes Yes
class No Yes
clear No Dep.
id Yes Yes
style No Yes
<caption>   Creates a caption for a table No Yes
<center>   Centers text horizontally. Yes Dep.
<cite>   Indicates that a section of text is quoted from another source Yes Yes
<code>   Displays the enclosed text in a monospace font, as sample computer code Yes Yes
<dd>   Used within a <dl> or definition list block, this tag encloses the definition of a term that makes up part of a definition list Yes Yes
class No Yes
id Yes Yes
style No Yes
title Yes Yes
<del>   Deleted text. Rendered with a line through the enclosed text Yes No
<dfn>   Used at first mention when a term is defined, and renders enclosed text as italics Yes Yes
<dir>   Creates a directory-style list. No No
<div>   Defines a “block” Yes Yes
align Yes Dep.
class No Yes
id Yes Yes
style No Yes
title No Yes
bgcolor Yes No
<dl>   Creates a glossary-style list containing <dt> and <dd> tags. Yes Yes
class No Yes
id Yes Yes
style No Yes
title Yes Yes
<dt>   Encloses a term to be defined in a definition list. Yes Yes
class No Yes
id Yes Yes
style No Yes
title Yes Yes
<em>   Emphasizes a text element Yes Yes
class No Yes
id Yes Yes
style No Yes
title Yes Yes
<font>   Alters the font appearance of the text it encloses No Dep.
class No Yes
color Yes Dep.
face Yes Dep.
id Yes Yes
size Yes Dep.
style No Yes
<head>   Typically encloses the <title>, <base>, <style>, and <link> tags of HTML document source Yes Yes
<h1 to h6>   Defines heading styles of varying sizes, with <h1> being the largest and <h6> being the smallest Yes  
<hr />   create an horizontal rules Yes Yes
align No Dep.
class No Yes
color Yes Dep.
id Yes Yes
noshade No No
size No Dep.
style No Yes
title No Yes
width Yes Dep.
<html>   Indicates the start and end of an HTML document Yes Yes
<i>   italic Yes Yes
class Yes Yes
id Yes Yes
style No Yes
title No Yes
<img />   defines an inline image within the text   Yes
align Yes Dep.
alt Ignored Yes
border Yes Dep.
class No Yes
height Yes Dep.
hspace No Dep.
id Yes Yes
longdesc Ignored Yes
lowsrc No Yes
src Yes Yes
style No Yes
title Yes Yes
usemap No Dep.
vspace No Dep.
width Yes Dep.
<ins>   Meant to indicate inserted text No No
<kbd>   Sets the enclosed text in a monospace font Yes Yes
<li>   Used to indicate an item in an list Yes Yes
class Yes Yes
id Yes Yes
style No Yes
title Yes Yes
type No No
<link />   used to link external stylesheets No Yes
href Yes
id Yes
media Yes
rel Yes
rev Yes
title Yes
type Yes
<listing>   Creates a block rendered with indented margins & mnospace fonts No No
class
id
style
title
<map>   This tag encloses the <area> tags used to define the clickable areas within image maps No Yes
class Yes
id Yes
lang Yes
name Dep.
style Yes
title Yes
<menu>   Creates a menu list from the list items it contains No Yes
id No
<meta>   speficy meta information for search engine Ignored Yes
name Yes
content Yes
scheme Yes
<object>   Imports applets into an object No Yes
align Yes
archive Dep.
border Dep.
height Dep.
hspace Dep.
type Yes
usemap Yes
vspace Dep.
width Dep.
<ol>   Creates a numbered list from the list items it contains, each of which has to have a <li> tag Yes Yes
class No Yes
id Yes Yes
start No No
style No Yes
type No Dep.
<p>   Defines a paragraph of text, indents the first line of the paragraph, and creates a line break at the end of the enclosed text Yes Yes
align Yes Dep.
class No Yes
id Yes Yes
style No Yes
title Yes Yes
<param>   used within a <object> tag to specify parameter values No Yes
name Yes
value Yes
valuetype Yes
type Yes
<plaintext>   Changes the font to monospace and preserves whitespace. No No
<pre>   Preformatted text requires KindleGen 1.0 Yes Yes
class Yes
id Yes
style Yes
title Yes
<q>   Used to indicate a short, in-line quotation No Yes
cite Yes
<s>   Identical to <strike> Yes Dep.
class No Yes
id Yes Yes
style Yes Yes
title Yes Yes
<samp>   Used to indicate a sample text. Text appears inmonospace font. Yes Yes
class No Yes
id Yes Yes
style No Yes
title No Yes
<small>   Reduces the current font by one Yes Yes
class No Yes
id Yes Yes
style No Yes
title No Yes
<span>   A container for in-line text. Yes Yes
bgcolor Yes No
title Yes Yes
<strike>   create a strikethrough text Yes Dep.
class Yes Yes
id Yes Yes
style No Yes
title No Yes
<strong>   Contains text rendered with bold. Same as <b> Yes Yes
class Yes Yes
id Yes Yes
style No Yes
title No Yes
<style>   Specifcy CSS style information No Yes
type Yes
<sub>   Reduces the font size of the enclosed text and floats it below the baseline as subscripted text Yes Yes
class No Yes
id Yes Yes
style No Yes
title No Yes
<sup>   Reduces the font size of the enclosed text and floats it below the baseline as subscripted text Yes Yes
class Yes Yes
id Yes Yes
style No Yes
title No Yes
<table>   Creates a table, which must be filled using the <td>, <th>, and <tr> tags Yes Yes
align Ignored Dep.
bgcolor Yes Dep.
border Yes Yes
cellpadding No Yes
cellspacing Yes Yes
summary No Yes
width Yes Dep.
<td>   Creates a cell within a table   Yes
abbr No Yes
align Yes Yes
bgcolor Yes Dep.
colspan Yes Yes
height No Dep.
nowrap No Dep.
rowspan Yes Yes
valign Yes Yes
width Yes Yes
<th>   Indicates a table header for a row or column; the header itself is displayed as bold Yes Yes
abbr
align Yes Yes
bgcolor Yes Yes
colspan Yes Dep.
height Yes Yes
nowrap No Dep.
rowspan Yes Dep.
valign Yes Yes
width Yes Yes
<title>   Encloses the title of a document Yes Yes
<tr>   Creates a row within a table Yes Yes
align No No
bgcolor Yes Dep.
valign Yes Yes
<tt>   Like the <kbd> tag, this tag encloses text to be displayed in a monospaced font Yes Yes
class No Yes
id Yes Yes
style No Yes
title No Yes
<u>   This tag underlines any text it encloses Yes Dep.
class No Yes
id Yes Yes
style No Yes
title No Yes
<ul>   Generates a bulleted list from the list items it contains. Yes Yes
class Yes Yes
id Yes Yes
style No Yes
title No Yes
<var>   Indicates a variable name or program argument Yes Yes
<xmp>   Creates a block rendered with indented margins, and monospaced font No No

[edit] For more information

Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox