Home  Beta programs 
  Welcome to Mobipocket Developer Center
powered by FreeFind

Creating Content

Getting Started
What is the Mobipocket file formatHow do I create a Mobipocket eBookStandard eBooksAdvanced eBooks
eBook features
Cross-platform feature supportImage supportTable supportCover PageParagraph rendering and hyphenationHyperlinksGuide itemsFramesIndexes and DictionariesSectionsAuthoring tips
Extended eBook features
DatabasesSQL queriesJavascriptHTML forms
Reference
Open-eBook HTML tagsSupported HTML entitiesHTML form tagsMobipocket custom tagsOPF x-metadata tagsMobipocket URLsMobipocket Document Object Model (DOM)Mobipocket Active Server Pages (ASP)Mobipocket Active Data Objects (ADO)Mobipocket Javascript Objects
Medical
Drug interaction module
Advanced topics
Setting margins
Home | Hide TOC | Add to Favorites


Contents
Introduction
Force alignment
First Line Indentation
Space before a paragraph

1. Introduction

Text is displayed by default in the Reader with full justified alignment, and automatic hyphenation of words.
The user can change alignment to Left align text in the user settings.


2. Force alignment

The left alignment of the text can be forced with the <p align="left"> or <div align="left"> tag.

  • It is recommended to force a left alignment on a list of titles in a table of contents, or on headings.
  • On the body of the text, It is recommended to let the user choose his settings: alignment must NOT be set if it is not strictly needed. The user should be able to choose the settings he prefers (justified or left align).

3. First Line Indentation

The rendering of the <p> tag by the Reader inserts by default an indent at the start of the paragraph.

The indentation of the first line of a paragraph can be forced by adding the width of a paragraph :

<p width="X"> (pixels), <p width="X%">,<p width="Xem"> or <p width="Xpt">
   or
text-indent: X (%, em, pt, or nothing for pixels) with a style sheet.
X is an INTEGER and can be positive or negative for positive or negative indentation. negative indentation requires Reader 6

Tips: To avoid displaying an indent, use <p width= 0>, or use <br/> line breaks. The <p>..</p> block also automatically inserts a line space between paragraphs. Use <br> if you want to avoid that.

Samples:
  • <p width="0">: no indentation of the first line 
  • <p width="10%">: positive indent (10% of the width of the page)
  • <p width="5em">: positive indent (5 em)
  • <p width="-10pt">: negative indent (10 pt) negative indentation requires Reader 6
  • <p width="-10">: negative indent (10 pixels) negative indentation requires Reader 6

4. Space before a paragraph

The rendering of the <p> tag by the Reader inserts by default a vertical space before the start of the paragraph.

The vertical space can also be forced by adding the height of a paragraph:

<p height="Y"> (pixels), <p height="Y%">,<p height="Yem"> or <p height="Ypt">
Y is an INTEGER and can be only positive.

Copyright 2000-2007 Mobipocket.com