files/en-us/web/svg/reference/attribute/text-rendering/index.md
The text-rendering attribute provides hints to the renderer about what tradeoffs to make when rendering text.
[!NOTE] As a presentation attribute,
text-renderingalso has a CSS property counterpart: {{cssxref("text-rendering")}}. When both are specified, the CSS property takes priority.
You can use this attribute with the following SVG elements:
html,
body,
svg {
height: 100%;
}
<svg viewBox="0 0 140 40" xmlns="http://www.w3.org/2000/svg">
<text y="15" text-rendering="geometricPrecision">Geometric precision</text>
<text y="35" text-rendering="optimizeLegibility">Optimized legibility</text>
</svg>
{{EmbedLiveSample("Example", "420", "140")}}
auto
optimizeSpeed
optimizeLegibility
geometricPrecision
{{Specifications}}
{{Compat}}