tei:table (table) “contains text displayed in tabular form, in rows and columns” (http://www.tei-c.org/P4X/ref-TABLE.html). The tei:table element contains rows made up of cells.

For a general discussion of how to encode tables in a variety of structural languages, see Table (part of the Category:How_do_I_encode… Binder). For a complete discussion of the tei element, see the relevant sections of the TEI P4 guidelineshttp://www.tei-c.org/P4X/.

Tables never should be used in any structural language to position non-tabular material (e.g. multiple columns of text) on the page. Such layout can and should be handled by style sheets.

Subclasses and attributesThere are no required attributes or subclasses.@type or @rend may be used to distinguish among different types of tables, e.g.rend=”wide” rend=”tall” rend=”border” See the TEI Guidelines for a discussion of available attributes.StyleTables may be formatted a number of ways depending on their nature and type:

  • With or without border lines.
  • With cells, rows, or columns of different background colors.
  • With some cells in borders.


If you are attempting to display a TEI XML document directly in a commercial browser, the following CSS fragments can be used to style the element:


table { display:table; }

This assumes the table is to appear as a block element (similar to a paragraph). Tables used in-line should have their @display set to inline-table. The table has no borders.

With thin single borders

The following adds a thin solid border around the table. Setting to border collapse to collapse ensures that only a single line appears between rows, columns, with borders.

table { display:table; border: thin solid black; border-collapse: collapse; }

For additional CSS table styles, see [[Table#CSS | Table[] (part of the Category:How_do_I_encode… binder).

XSLT Conversion to XHTML

If you are going to convert your TEI table to XHTML, the minimal template looks like this

<xsl:template match="table">

<xsl:template match="row">

<xsl:template match="cell">

CSS styles for this element are as above.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.