ReferenceEssential Concepts

How PreTeXt works

Definitions: Tags and Attributes

PreTeXt is a markup language much like HTML. When creating content in PreTeXt, you are essentially working with two types of data objects:

  • Tags - also referred to as elements, tags are keywords between angle brackes, e.g. <title>...</title>. They can have further content within them, or they can be self-closing, e.g. <emdash />.
  • Attributes - provide information necessary to refine or specify the desired behavior for a tag. For example, to have an unordered list with square bullet points, you could write <ul marker="square">...</ul>. In this case, marker="square" is an attribute of the <ul> tag.

A simple example of a PreTeXt document may look like:

<pretext>
    <article>
        <section>
            <title xml:id="definitions">Definitions</title>
            <p>PreTeXt is a markup language.</p>
        </section>
    </article>
</pretext>

The PreTeXt Guide has a full introduction to PreTeXt and its concepts.