SVG word-spacing Attribute
The word-spacing attribute in SVG is used to indicate the spacing between words. This spacing can be changed by using the length value of the attribute.
When the length is mentioned without a unit identifier, the browser processes it as a width value in the current user coordinate system, otherwise, if it is mentioned with one of the unit identifiers, then the browser converts it into a corresponding value in the current user coordinate system.
Note: This attribute can be applied to any element but it has effect only on the <altGlyph>, <text>, <textPath>, <tref>, and <tspan> elements.
Attribute Value: This attribute accepts a single value as mentioned above and described below:
- length: It is a number that specifies the space between the words. It can be followed by one of the units of length like px, cm, mm, pt, etc.
Below examples illustrate the use of the word-spacing attribute: