HTML attribute: elementtiming

The elementtiming attribute is used to indicate that an element is flagged for tracking by the Element Timing API. This attribute may be applied to <img>, <image> elements inside an <svg>, poster images of <video> elements, elements which have a background-image, and elements containing text nodes, such as a <p>.

Usage

The value given for elementtiming becomes an identifier for the observed element.

<img alt="alt" src="img.jpg" elementtiming="label for element">

Good contenders for elements you might want to observe are:

  • The main image for an article.
  • A blog post title
  • Images in a carousel for a shopping site.
  • The poster image for the main video on a page.

Examples

<img alt="Alt for a main blog post image" src="my-massive-image.jpg" elementtiming="Main image">

<p elementtiming="important-text">Some very important information.</p">

Specifications

Specification Status Comment
Element Timing
The definition of 'for as used with label' in that specification.
Editor's Draft

Browser compatibility

No compatibility data found for html.elements.attribute.elementtiming.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.

See also