Skip to content

Tagged PDF Structure — Complete Guide

DodaTech Updated 2026-06-28 5 min read

In this tutorial, you will learn about Tagged PDF Structure. We cover key concepts, practical examples, and best practices to help you master this topic.

Tagged PDF structure is a hierarchical tree of tags — similar to the HTML DOM tree — where each content element is assigned a semantic type such as heading, paragraph, table, list, or figure, enabling screen readers to navigate and interpret the document correctly.

What You'll Learn

You will learn what tag types are available in the PDF specification, how the structure tree organizes content hierarchically, how to inspect and modify tags using Adobe Acrobat, and best practices for tagging different content types.

Why It Matters

Screen readers rely exclusively on the tag tree to present content to users. If the tag tree is missing, flat, or incorrect, the user experience degrades to a raw text dump with no headings, no lists, and no table relationships.

Real-World Use

An accounting firm delivers audit reports as PDFs. Before tagging, screen readers read financial tables as continuous text, and blind auditors cannot skip to specific line items. After applying proper table tags (<Table>, <TR>, <TD>), users can navigate cell by cell and hear column headers announced.

Tag Tree Structure

flowchart TD
  A["Document Root (Document)] --> B["Part (Sect)"]
  A --> C["Sect"]
  B --> D["

Report Title"] B --> E["

Introduction"] C --> F["

Financial Results"] C --> G[""] G --> H[" Header Row"] G --> I[" Data Row"] G --> J[" Data Row"] B --> K["
Chart"] K --> L["Alt Text: Revenue chart"]

Standard Tag Types

The PDF specification defines standard structure types in the /StructTreeRoot:

Tag Meaning HTML Equivalent
Document Root of the entire document <html>
Part Major division (part, volume) <section>
Sect Section of content <section>
H1–H6 Headings at six levels <h1><h6>
P Paragraph <p>
L List <ul> or <ol>
LI List item <li>
Lbl List item label (number/bullet) Generated content
Table Table container <table>
TR Table row <tr>
TH Table header cell <th>
TD Table data cell <td>
Figure Image or graphic <img>
Caption Caption for figure/table <figcaption>
Note Footnote or endnote <aside>
Span Inline content <span>

Creating Tags

From Microsoft Word

Save as PDF and use the "Export" tab — not "Print" or "Save as Adobe PDF" — to preserve heading styles as tags.

# Using python-docx to prepare a tagged output
from docx import Document

doc = Document()
doc.add_heading("Chapter 1: Overview", level=1)
doc.add_paragraph("This is the opening paragraph.")
doc.add_heading("Data Summary", level=2)

table = doc.add_table(rows=3, cols=2)
table.style = "Table Grid"
for i, text in enumerate(["Year", "Revenue", "2024", "120K", "2025", "150K"]):
    row = i // 2
    col = i % 2
    table.cell(row, col).text = text

doc.save("tagged-source.docx")
# Export to PDF using Word's "Export" to preserve heading styles as H1, H2 tags

Editing Tags in Acrobat Pro

Open the Tags panel (View > Show/Hide > Navigation Panels > Tags). You can:

  • Right-click and create new tags
  • Drag tags to reorder
  • Change a tag type by right-clicking > Properties > Type
  • Add alt text to Figure tags via Object Properties
// Acrobat JavaScript to set a tag type
// Select a tag in the Tags panel first
var tag = this.selectedTags[0];
if (tag) {
    tag.structType = "H1";
    console.println("Tag changed to H1");
}

Common Mistakes

  1. Plain text outside any tag — Content not wrapped in a tag is invisible to the structure tree. Use the Touch Up Reading Order tool to wrap orphan text.

  2. Using H1 for all headings — Every heading should use the appropriate level (H1 for document title, H2 for major sections, H3 for subsections). Flat heading structures defeat navigation.

  3. Tagging table headers as data — Table header cells (<TH>) must be distinguished from data cells (<TD>). Screen readers use <TH> to announce column context.

  4. Missing artifact marking — Decorations, repeating headers, and page numbers should be artifacts, not tags. Remove them from the tag tree or mark as artifact.

  5. Nesting errors — A <LI> must be inside an <L>. A <TD> must be inside a <TR> inside a `

    >. Invalid nesting violates PDF/UA.

    Practice and Challenge

    1. List five tag types and their corresponding HTML equivalents.
    2. How do you check whether a PDF has a tag tree in Acrobat?
    3. What happens to a <Figure> tag that has no alt text?
    4. Why should page numbers be marked as artifacts instead of having dedicated tags?
    5. What tool can create initial tags from a scanned document?

    Challenge: Take a 2-page PDF with headings, an image, and a table. Using Acrobat Pro, inspect the tag tree. Reorder any misplaced tags, change incorrect tag types, and add alt text to the image. Export a tag report showing before and after.

    FAQ

    What if my PDF has no tags at all?

    Use Acrobat's Auto-Tag feature (Accessibility > Auto-Tag Document). It creates an initial tag tree, but you must manually verify and fix subtags — auto-tagging is never perfect.

    Can I tag a PDF programmatically?

    Yes. Libraries like iText, PDFBox, and our own python-pdf-tools support creating tagged PDFs from code. You define the structure tree in parallel with the content.

    Do all screen readers use the tag tree?

    JAWS, NVDA, and VoiceOver all rely on the tag tree when available. If the tag tree is missing, they fall back to internal text extraction heuristics, which produce unreliable results.

    How detailed should the tag tree be?

    Every meaningful content element should be tagged. Artifacts should not be tagged. The tag tree should mirror the visual hierarchy without being overly granular.

    What is the difference between Artifact and Figure?

    Artifact marks content that is decorative or repetitive (page numbers, headers). Figure marks content that conveys information (images, charts) and needs alt text.

    Mini Project

    Create a 3-page sample report in Word containing: a title, two sections with headings, a bullet list, a table (3 columns by 5 rows), and a chart image. Export as a tagged PDF using Word's Export function. Open in Acrobat and inspect the tag tree. Fix at least three tagging issues you find and write a brief report of your changes.

    What's Next

    Move to Reading Order in PDFs to ensure your tagged content flows in the correct sequence, then continue to Headings Structure in PDFs for heading-specific best practices.

    Built by the developers of DodaTech

    Doda Browser, DodaZIP & Durga Antivirus Pro