files/en-us/web/svg/reference/element/textpath/index.md
The <textPath> SVG element is used to render text along the shape of a {{SVGElement("path")}} element.
The text must be enclosed in the <textPath> element and its {{SVGAttr("href")}} attribute is used to reference the desired <path>.
{{svginfo}}
path attribute is set, href has no effect.
Value type: <URL>; Default value: none; Animatable: yesspacing | spacingAndGlyphs; Default value: spacing; Animatable: yesalign | stretch; Default value: align; Animatable: yesleft | right; Default value: left; Animatable: yesauto | exact; Default value: exact; Animatable: yes0; Animatable: yesThis element implements the {{domxref("SVGTextPathElement")}} interface.
html,
body,
svg {
height: 100%;
}
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<!-- to hide the path, it is usually wrapped in a <defs> element -->
<!-- <defs> -->
<path
id="MyPath"
fill="none"
stroke="red"
d="M10,90 Q90,90 90,45 Q90,10 50,10 Q10,10 10,40 Q10,70 45,70 Q70,70 75,50" />
<!-- </defs> -->
<text>
<textPath href="#MyPath">Quick brown fox jumps over the lazy dog.</textPath>
</text>
</svg>
{{EmbedLiveSample('Example', 200, 200)}}
{{Specifications}}
{{Compat}}