Favorites

HTML containertiming Global Attribute

containertiming
HTML Global AttributeThis global attribute is not supported by modern browsers.
Updated 22nd November 2026

The containertiming attribute marks an element as a container whose paint timing is reported by the Container Timing API. It is experimental.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Description

This is an experimental attribute. It is only available behind a flag in Chrome, Edge and Opera (from version 145) and behind a preference in Firefox (from version 156).

The containertiming global attribute marks an element as a container root for the Container Timing API. The browser then reports when new content is painted inside the element's subtree, so a page can measure how long it takes for an important area, such as a hero section or a list of products, to be fully rendered. It works like Largest Contentful Paint, but for a part of the page chosen by the developer.

Paints to new areas inside the container count towards its timing; repaints of areas that were already painted, and content painted by the root element itself, do not. Entries are only reported until the user scrolls or interacts with the page.

The value is a string that identifies the container. It is returned as the identifier property of the PerformanceContainerTiming entries, which are read with a PerformanceObserver using the "container" type. In the DOM the attribute is reflected as element.containerTiming. Use containertimingignore to leave parts of a container out of the measurement.

new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    console.log(entry.identifier, entry.startTime);
  }
}).observe({ type: "container", buffered: true });

Syntax

<element containertiming="identifier">

Values

  • identifierA string that names the container. It is returned in PerformanceContainerTiming.identifier.

Example

<section containertiming="hero">
<h1>Welcome</h1>
<p>This section is measured by the Container Timing API.</p>
</section>
<ul id="log"></ul>
<script>
try {
new PerformanceObserver(function (list) {
list.getEntries().forEach(function (entry) {
var li = document.createElement("li");
li.textContent = entry.identifier + " painted at " + Math.round(entry.startTime) + " ms";
document.getElementById("log").appendChild(li);
});
}).observe({ type: "container", buffered: true });
} catch (e) {
document.getElementById("log").textContent = "The Container Timing API is not supported in this browser.";
}
</script>
Open in editor

Browser Support

The following information will show you the current browser support for the HTML containertiming global attribute. Hover over a browser icon to see the version that first introduced support for this HTML global attribute.

This global attribute is not supported by modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee