tspan element[1]
. x for an absolute x positiony for an absolute y positiondx for a relative x position (relative to the previous tspan)dy for a relative y position (relative to the previous tspan)font-familyfont-sizefont-styletext-decorationbaseline-shiftstroke (see svg styling support)style (see svg styling support)tspan elements are under text elements. There are several ways to put them under text:text element:
<g> <text style="font-size:40px;font-family:sans-serif;"> <tspan>Hello</tspan> <tspan stroke="red">World</tspan> </text> </g>
text element:
<g> <text style="font-size:40px;font-family:sans-serif;">Hello <tspan stroke="red">World</tspan> </text> </g>
x, y, dx, and dy attributes are not present for a tspan, the position of the tspan follows the previous tspan element.Copyright 2021-2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD-3-Clause License