From DM

Revision as of 14:48, 19 February 2012 by DominiqueS (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 guidelines, http://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 attributes

There are no required attributes or subclasses.

@type or @rend may be used to distinguish among different types of tables, e.g.


See the TEI Guidelines for a discussion of available attributes.


Tables 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 {

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 {
  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).


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.

Related topics

Bold text

Personal tools