title

Baseline
Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

The title attribute specifies a consultative title for an SVG element. When used on a <style> element, it acts as an identifier used to expose and select between alternate style sheets. You can use this attribute with the following SVG elements:

Example

html
<svg viewBox="0 0 100 20" xmlns="http://www.w3.org/2000/svg">
  <style title="Default Style">
    circle {
      fill: gold;
    }
  </style>
  <circle cx="10" cy="10" r="5" />
</svg>

Usage notes

Value string
Default value None
Animatable No

Specifications

Specification
Scalable Vector Graphics (SVG) 2
# StyleElementTitleAttribute

Browser compatibility

See also