TEI tag

Encoding instructions for the TEI tag

<TEI>

Every TEI file begins with a <TEI> element containing three attributes:

<TEI xml:id="kp-eb0706-4127-0548-01" xml:lang="en" xmlns="http://www.tei-c.org/ns/1.0">
  1. @xml:id is the primary identifier for the entry. It is structured to provide useful information to end users.
    kp + print-edition & volume + image-sequence + page-number + position-on-the-page.
    • The image-sequence is a 4-digit number taken from the filename of the page scan image.
    • The position-on-the-page is a 2-digit number indicating whether the entry appears first, second, or third on that page.
    Thus the example above identifies the entry that appears in the seventh edition, volume 6, on page 548, where it is the third entry.
  2. @xml:lang identifies the primary language of the entry as English.
  3. @xmlns tells us that this is a TEI document by linking to the TEI namespace.

TEI structure

Following the <TEI> element, TEI documents contain two additional elements that divide the document into two sections.

  1. <teiHeader> contains metadata for the file.
  2. <text> contains the body text, the part seen when the page is displayed.

The details in this style guide apply to the <text> portion of each document. Some information about metadata encoding in the <teiHeader>can be found in Master Files.