TTML, the Timed Text Markup Language, is an XML-based standard from the W3C for describing text that appears in synchronization with media, such as subtitles, captions and on-screen descriptions. In video accessibility, TTML serves as a rich interchange and delivery format that carries not only the words and their timing but also positioning, styling and language metadata needed for accessible viewing.
Unlike simple sidecar formats, TTML was designed to preserve the full intent of professional captioning, which is why broadcasters, streaming platforms and archive systems use it as a master or distribution format across many devices.
How a TTML document is structured
A TTML file is an XML document with a root tt element that contains a head and a body. The head defines styles, regions and metadata, while the body holds the timed content in div, p and span elements. Each paragraph carries begin and end attributes that tell the player exactly when the text should appear and disappear.
This separation of content from presentation is the central design idea. A caption author can define a region such as the lower third of the screen once, attach a style with font, color and background, and then reference both from hundreds of cues. The table below lists the core building blocks.
| Element | Location | Purpose |
|---|---|---|
tt | Root | Declares namespaces, language and timing parameters |
styling and style | Head | Define fonts, colors, outlines and backgrounds |
layout and region | Head | Define screen areas where text may appear |
div and p | Body | Group and hold individual caption cues |
span | Body | Applies styling to part of a line |
br | Body | Forces a line break inside a cue |
Timing models and expressions in TTML
TTML supports several time expression formats, which lets it match both broadcast and web workflows. Clock time such as 00:01:23.500 is common, while frame-based timing expressed against a declared frame rate suits broadcast material where captions must align with exact video frames.
Timing can also be relative to a parent element, so a whole block of cues can be shifted by changing one value. This flexibility is powerful but is a frequent source of errors when different tools interpret time bases and frame rates inconsistently, for example between 25 fps and 29.97 fps drop-frame material.
| Expression type | Example | Typical use |
|---|---|---|
| Clock time | 00:00:05.250 | Web and streaming delivery |
| Frame-based clock | 00:00:05:06 | Broadcast workflows tied to timecode |
| Offset in seconds | 5.25s | Simple programmatic generation |
| Offset in frames | 131f | Frame-accurate editing tools |
| Offset in ticks | 52500000t | High-precision streaming profiles |
TTML profiles used in practice
Full TTML is large and flexible, so industry groups define profiles that restrict it to a predictable subset. A player that supports a profile can render every file that conforms to it, which is essential for interoperable accessibility across televisions, browsers and mobile devices.
| Profile | Main domain | Notable characteristic |
|---|---|---|
| IMSC 1.x Text | Streaming and web | W3C profile adopted by many platforms |
| IMSC 1.x Image | Streaming of graphic subtitles | Carries subtitle images instead of text |
| EBU-TT-D | European broadcast distribution | Designed for online and HbbTV delivery |
| SMPTE-TT | US broadcast and online video | Can embed legacy CEA-608 data |
| DFXP | Early web and Flash players | Original 1.0 profile name, now legacy |
IMSC, the Internet Media Subtitles and Captions profile, has become the most important modern profile because it is referenced by streaming packaging standards and can be carried inside fragmented MP4 segments used by DASH and HLS delivery.
TTML compared with other caption formats
TTML competes with simpler text formats and with legacy broadcast standards. Its main advantage is expressive styling and positioning, which supports accessibility features such as speaker placement, colored text for speaker identification and avoidance of on-screen graphics. Its main drawback is verbosity and complexity compared with plain-text formats.
| Format | Syntax | Styling and layout | Typical role |
|---|---|---|---|
| TTML | XML | Rich, region-based | Mastering, broadcast and streaming |
| WebVTT | Plain text | Moderate, CSS-based | HTML5 web video |
| SubRip | Plain text | Minimal | Consumer subtitles and simple exchange |
| SCC | Encoded hex pairs | Limited to CEA-608 features | Legacy US broadcast captions |
| CEA-708 | Binary in video stream | Moderate, window-based | US digital television captions |
In practice, many workflows keep a TTML or IMSC master and convert it to WebVTT for browsers or to SCC for legacy broadcast outlets. Each conversion can lose positioning or styling, so quality control after conversion is a standard step.
Accessibility strengths and common pitfalls
TTML supports accessibility well when it is authored carefully. It can mark language per element, place captions away from burned-in graphics, and express non-speech information such as sound effects for closed captions and SDH. It also allows viewers’ players to apply user preferences, since styles are declared separately from text.
- Profile mismatch: a file valid as full TTML may be rejected by an IMSC-only player.
- Frame rate errors: wrong
frameRateorframeRateMultipliervalues cause drifting captions. - Overlapping regions: poorly defined regions can hide text behind other cues.
- Excessive styling: decorative fonts and low contrast reduce readability for low-vision viewers.
- Missing language tags: screen readers and players cannot select the correct language track.
Validation against the target profile, combined with visual playback checks on the actual devices, catches most of these problems before release. Accessibility reviewers also check caption reading rate and synchronization, which TTML records precisely but cannot enforce by itself.
A non-technical view
TTML is a way of writing down captions so that any compatible video player knows what to show, when to show it and where. Think of it as a detailed script for the words on screen, with notes about timing, position and appearance.
Simpler caption files only list the words and times. TTML adds instructions for layout and style, so a caption can move to the top of the screen when a scoreboard is at the bottom, or change color to show who is speaking. That extra detail helps people who are deaf or hard of hearing follow the video more easily.
A concrete example
A public broadcaster prepares a documentary series for its streaming service and its television channel. The captioning team authors one IMSC 1.1 Text master in TTML at 25 frames per second, using two regions: the default lower area and an upper area for scenes with lower-third name graphics.
From that single master, the delivery system packages captions into fragmented MP4 segments for DASH streaming, converts a copy to WebVTT for the web player, and creates an EBU-TT-D file for HbbTV. During quality control, reviewers notice that one converter ignored the upper region, so captions covered interviewee names on the web player. After fixing the converter settings, all three outputs show identical timing and placement, and the series passes the broadcaster’s accessibility checks on the first resubmission.