AccessibilityPDF — Martin Schrammel AB

Tags and structure

PDF tag reference

Find the purpose of standard tags and see which names differ between PDF 1.7 and PDF 2.0.

Applies to
Overview of standard structure types; not a complete specification of nesting and attributes
Sources checked
Language

Choose the tag by meaning

A tag describes what content is, not how it looks. Large text is not always a heading. A box is not automatically a table. The names below are case-sensitive technical names. Our example trees explain structure; they are not code to paste into a PDF.

Read relationships, not only tag names

The reference becomes useful when you know what each tag should represent. Start with the page: is the content a section heading, a paragraph, a list item or a table cell? Then inspect both the structural type and the content associated with it.

A Table whose children are all P does not describe cell relationships merely because its outer container is called a table. A typical row structure needs TR and cells represented by TH or TD. Similarly, L alone does not make a well-formed list when its items are misplaced. The container contributes meaning; its internal relationships make that meaning usable.

The tag tree is not a map of page coordinates. A paragraph can continue across a page break. A heading wrapping onto two lines remains one heading. Avoid creating separate content elements for each line or page when this splits a continuous thought.

Documents and groups in PDF 1.7

TagPurpose in brief
DocumentThe document’s overall structure.
Part, Art, SectPart, article and section; choose according to the organisation of the content.
Div, NonStructGrouping; do not replace a more meaningful tag with these.
BlockQuoteA quotation presented as a separate block.
CaptionA figure, table or list caption.
TOC, TOCIA table of contents and one of its entries.
IndexAn index.
PrivateApplication-specific private content; not a shortcut for hiding information readers need.
This table scrolls horizontally.

Sources: [1], [2]

Text, headings and lists

TagPurpose in brief
PParagraph.
H, H1–H6Heading; numbered types give an explicit level in PDF 1.7.
L, LIList and list item.
Lbl, LBodyA label or number and the item’s body.
SpanA text portion without a distinct structural meaning of its own.
Quote, NoteInline quotation and note.
Reference, BibEntryA reference and a bibliographic entry.
CodeComputer code.
This table scrolls horizontally.

Sources: [1]

Tables, images and interaction

TagPurpose in brief
Table, TRTable and row.
TH, TDHeader cell and data cell.
THead, TBody, TFootRow groups: header, body and footer.
FigureAn image or other graphical information.
FormulaMathematical formula.
LinkLink structure; its connection to the link annotation also needs to work.
AnnotAnother annotation represented in the structure.
FormInteractive form field; labels, properties and keyboard use also need checking.
This table scrolls horizontally.

Sources: [1], [4], [5]

Ruby and warichu

Ruby represents pronunciation or other annotations associated with base text. Warichu supports particular inline commentary in East Asian typography. These are distinct text structures, not general-purpose footnote mechanisms.

TagPart
Ruby, RB, RT, RPWhole, base text, annotation text and delimiters.
Warichu, WT, WPWhole, text and delimiters.
This table scrolls horizontally.

Sources: [1]

Changes in PDF 2.0

PDF 2.0 adds Title, FENote, Aside, DocumentFragment, Em, Strong, Sub and the Artifact structure type. Numbered headings can go beyond H6. Sub means a subdivision of a block, not automatically subscript text.

Art, BlockQuote, BibEntry, Code, Index, Note, Private, Quote, Reference, TOC and TOCI are not in the PDF 2.0 standard namespace. Their names are not thereby banned from every PDF 2.0 file: namespaces and any role mapping need assessment. The meaning of some shared names has also changed.

Sources: [2], [3]

Artifacts use different mechanisms across versions

In PDF 1.7, artifacts are specially marked page content, not a standard structure type in the tag tree. PDF 2.0 also has a structure type named Artifact. Do not confuse the mechanisms when repairing or validating a file.

Sources: [1], [2]

Four common classification mistakes

A boxed passage is not automatically a table. If it contains a heading and two paragraphs, those are the meanings to represent. A table is appropriate when information has relationships in both rows and columns. Do not use Table merely because the authoring tool used a table for layout.

A quotation needs distinguishing from ordinary text where the distinction carries meaning, but an arbitrary italic word is not consequently a block quotation. Choose a type appropriate to the PDF version and namespace; the PDF 1.7 reference cannot be applied unchanged to every PDF 2.0 file.

A note needs meaningful content and a usable connection between its reference and text where navigation is needed. Renaming P to Note or FENote does not create the complete relationship. Check that the note does not interrupt the main text mid-sentence.

A Formula represents a mathematical expression, not merely an image of unusual characters. Its representation and delivery depend on the target standard and tool support. A simple spoken substitute can help in some contexts, but is not a universal solution for mathematics.

Sources

  1. Tagged PDF Best Practice Guide: SyntaxPDF Association
  2. Standard structure elements in PDF 1.7 and PDF 2.0PDF Association
  3. Well-Tagged PDF 1.0PDF Association
  4. PDF10: Labels for interactive form controlsW3C
  5. PDF12: Name, role and value for form fieldsW3C

Examples are our own unless stated otherwise. These guides distinguish legal requirements, standards and practical advice. Passing an automated check is not a complete assessment of document accessibility.

All guides

Need help with your PDFs?

The service is in development. Sign up for an email when we open. You can read the full knowledge library in the meantime.

Get a launch notice