| Home Beta programs |
Welcome to Mobipocket Developer Center |

Creating ContentGetting StartedWhat 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 |
About the good usage of TablesContents Use tables for tabular data only How to handle large tables? Framed paragraphs, colored backgrounds... Use tables for tabular data onlyTable tags have to be used only when displaying tabular data and not like in Web page authoring for layout purposes. There is no exception to this rule. Nested tables are not supported : this means you cannot put a table tag inside a cell of another table. This mechanism is mostly used when doing positioning of elements in Web sites, not for tabular data. However, rowspan and colspan attributes are supported, so you can do almost everything you need with only one table tag and smart use of rowspan & colspan. Here is an example of a table that will work well in Mobipocket ebooks in HTML format:
How to handle large tables?Table parsing and display is very CPU intensive and is slow compared to any other HTML tag. Moreover, the Mobipocket reader can handle tables that are larger than the screen but the user experience becomes worse as the table size grows. You should therefore avoid large tables. If you encounter a table that covers a whole paper page, or a table that contains a lot of text in one cell, you are basically in front of a non-reflowable layout. Both rendering it in HTML or as an image will not work well because the resulting page will be much larger than a screen and the user will have difficulties reading it. Here, creative action has to be taken to redesign the table as something else that is reflowable. Example of a table that will not work in Mobipocket Reader: the following table is large and contains lots of text in its cells which means it should not be rendered as an HTML table or even an image but reformatted instead:
This table can be reformatted in the following reflowable way: ABUNAMON Known adverse affects:
CLOSTRAMON Known adverse affects:
Framed paragraphs, colored backgrounds...
Framed paragraphs or paragraphs you want to appear on a shaded background should never be rendered with a table. A table with a lot of text in one cell will not work well. If a single table cell does not fit into the screen, it will not be paginated and content will be lost. You can render framed paragraphs using the <div> tag with border and background color attributes. Here is an example: <div style="border: 1px solid black; background-color: gray;"><font color="white" size="+2"><img src="img/bookmark.gif" />Important information to be displayed in a frame so as to attract attention.</font></div> Will display as: Important information to be displayed in a frame so as to attract attention. |
© Copyright 2000-2007 Mobipocket.com