Hn
| Description | A generic heading element used when a specific heading level (such as H1–H6) is not applicable, often role-mapped to standard headings. |
|---|---|
| Namespace | 2.0 |
| Category | block |
Attributes
Specifies how the element is placed relative to surrounding content (e.g., block-level or inline flow).
Defines the direction of text flow (e.g., left-to-right, right-to-left, or vertical).
Sets the background color for the element’s content area.
Specifies the color of the border around the element.
Indicates the style of the border (e.g., solid, dashed, dotted).
Defines the thickness of the border line in user space units (such as points).
Determines the space between the element’s border (or boundary) and its inner content.
Applies the primary color (fill or stroke) for the text or graphic content.
Main indicator of type. This semantic association allows tools to present and support interaction with the object in a manner that is consistent with user expectations about other objects of that type.
Differences
Well tagged PDF:
The 'Hn' element in Well-Tagged PDF is used as a generic heading element where 'n' represents the level. It provides a flexible mechanism to denote hierarchical headings without being restricted to fixed levels.
For Well-Tagged PDF, 'Hn' should be used with a clear level indicator, ensuring that the document’s structure tree correctly reflects the hierarchy of content. The level number should accurately represent the logical importance and nesting of the heading.
PDFUA:
In PDF/UA, headings are critical for navigation by assistive technologies. 'Hn' is used to indicate headings at various levels, helping to establish the document’s outline and reading order.
PDF/UA requires that each heading tagged with 'Hn' is assigned a level that reflects its position in the hierarchy, and that it is accompanied by associated text (such as a title) that clearly describes the section. This ensures that screen readers can effectively navigate and announce the heading structure.
Use cases
Heading with stylistic changes that are encoded with Span
Try itSample hierarchy for a weekend weather report
Try itHeadings used with Aside element
Try itTag Relationships
Click on any tag to view its details.
Related Matterhorn Protocol checkpoints
- One or more non-standard tag’s mapping does not terminate with a standard type. NOTE: Although PDF/UA defines the nomenclature for heading levels above H6 (Hn), these are not standard structure types (as defined in ISO 32000-1) and therefore Hn tags must (PDF/UA-1 7.1, paragraph 1) be rolemapped to a standard structure type. According to PDF/UA-1, PDF/UA-conforming processors are expected to ignore such mappings and respect the heading level.
- The mapping of one or more non-standard types is semantically inappropriate.
- Tags are not in logical reading order.
- Structure elements are nested in a semantically inappropriate manner. (e.g. a table inside a heading).
- The structure type (after applying any role-mapping as necessary) of a structure element is not semantically appropriate.
- Headings are not tagged.
- Does use numbered headings, but the first heading tag is not H1.
- Numbered heading levels in descending sequence are skipped (Example: H3 follows directly after H1).
- Numbered heading tags do not use Arabic numerals.
- Content representing a 7th level (or higher) heading does not use an “H7” (or higher) tag.
- Document uses both H and H# tags. NOTE: In weakly-structured documents, headings always take the form “Hn” (e.g. H1, H2, Hn) without intervening whitespace or numerical separators.