<title> — the SVG accessible name element - SVG | MDN

Usage context

CategoriesDescriptive element
Permitted contentAny elements or character data

Attributes

This element only includes global attributes.

DOM Interface

This element implements the SVGTitleElement interface.

Example

html,
body,
svg {
  height: 100%;
}

html

<svg viewBox="0 0 20 10" xmlns="http://www.w3.org/2000/svg">
  <circle cx="5" cy="5" r="4">
    <title>I'm a circle</title>
  </circle>

  <rect x="11" y="1" width="8" height="8">
    <title>I'm a square</title>
  </rect>
</svg>

Specifications

Specification
Scalable Vector Graphics (SVG) 2
# TitleElement

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.