Text Encoding Guidelines (TEI) provide a means of encoding texts so that that they can be annotated and presented online.
“The Text Encoding Initiative (TEI) is a consortium which collectively develops and maintains a standard for the representation of texts in digital form. Its chief deliverable is a set of Guidelines which specify encoding methods for machine-readable texts, chiefly in the humanities, social sciences and linguistics. Since 1994, the TEI Guidelines have been widely used by libraries, museums, publishers, and individual scholars to present texts for online research, teaching, and preservation” (Text Encoding Initiative: Home Page).
TEI Tutorials
“Teach Yourself TEI”
“A Gentle Introduction to XML”
Sample TEI Projects:
Projects Using TEI at Tei-c.org
“Samples of TEI texts” at Wikipedia