Tables for EPUB and web

Layout and text styles for tables for web ebooks

Display graphics for EPUB and web tables

The stylesheet c3-epubwebtables.xsl has features and instructions to set up some styles for formal tables (which have a title) and informal tables (which do not have a title) for EPUB and web pages. The features for tables that can be set in the stylesheet are:

Other text formats for EPUB and web pages can be specified with XML markup, or in cascading stylesheets (CSS).

The following diagram shows the HTML markup that is generated for formal tables. This helps you to set styles for particular parts of tables using elements, attributes and classes in CSS. The nesting of HTML elements and attributes is shown as different coloured boxes.

Diagram of boxes that show how HTML elements, attributes and classes are nested for formal tables

XML markup to edit

Alternating row colour (striped tables). To create individual tables with a colour for every second row, there are two options to add the attribute "tabstyle" to the <table> element:
  • alternating row colour for tables with numbers—use <table tabstyle="numberstripe"> (set this at c3-60)
  • alternating row colour for tables with text—use <table tabstyle="stripe"> (set this at c3-65).

Stylesheet settings to edit

The relevant Stylesheet Guide page to set up text formats for EPUB and web pages is EPUBweb-tables.svg.