HTML
From MobileRead
| | Notice: This article is very short and probably incomplete. Be the first to add new content to it now. |
HTML stands for HyperText Markup Language and is the primary language used by all Internet web sites. There is plenty of other places to find out how this works in a browser but this site will focus on its use in an eBook Reader or as eBook source files.
Contents |
[edit] Ignoring Tags
A web browser is normally designed to ignore tags that is does not understand. However it expects a file to contain two sections, <Head> and <Body>. Ebook Readers will behave similarly but when a file is used as a source file it will often complain about entries it does not understand.
Most eBook generation programs do not require a head section and may not even need the body tag. Tags that are recognized but not needed will simply be ignored.
For example in a Tome Raider source file anything within following tag pairs will be skipped along with the tags themselves
- <HEAD> ... </ HEAD >
- <SCRIPT> ... </ SCRIPT >
- <TITLE> ... </TITLE>
- <STYLE> ... </STYLE>
If a <new> tag is found within the scope of any of above tags, a new subject will be started. <BODY>,<HTML> and <META> tags will be skipped.
[edit] Fonts and Characters
Data in HTML files will be displayed using a default set of fonts and a default set of characters unless specified in the file or CSS file. The W3C standard requires that a character set be specified. For example:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
will be specified as a line in the <head> section of the file. However many eBook readers are not able to decode meta statements.
[edit] Special Tags
EBook generation programs will almost always have tags that are not standard HTML tags. This is because the requires for a page based reader is very different from those of a browser.
For example the eBook Publisher tool used to generate IMP files for the eBookwise-1150 can use a tag <PB> to force a page break (new page) and uses <name="toc"/a> specially to find the start of the TOC data.
MobiPocket files have many special customized tags.
[edit] Style Sheets
eBook standards encourage the use of Style Sheets and CSS (Cascading Style Sheets) are the preferred form. However the use of these is optional and not even supported in all eBook formats. CSS style sheets can be in one or more separate files and can also be listed in between <STYLE> and </STYLE> keywords in the <HEAD> section of the document. If they are in a separate document then a pointer is needed in the <HEAD> section. For example:
<LINK HREF="Stylesheet.css" TYPE="text/css">
The Style attribute can also be used in other tags within the <BODY> of the document. When there is more that one style that could be used most specific reference will override the same entry in other places.
Style sheets do not have to be complicated. A simple style sheet might look like:
body {margin-left:2; x-sbp-widow-push:2; x-sbp-orphan-pull:1;
margin-right:1
}
h2, h1 {text-align:"center"}
[edit] For more information
http://www.w3.org/TR/REC-CSS1 - Style sheet standard.

