How To Reuse SVG Text With The tref Element

Writing SVG code once and being able to use it in multiple places helps you write more modular code and it helps make maintenance easier. SVG makes it easy to reuse text through the tref element.

Continue reading

How To Style and Position SVG Text With The tspan Element

The SVG text element allows you to easily position and style text, but what do you do if you want to position and style different parts of the text differently? Do you need to create multiple text elements? Nope. There’s an easier way.

Continue reading

How To Manipulate SVG Text

Last week I showed you how to create SVG text using the <text> element. In the examples I added x and y coordinates to position the text and the individual characters in a string of SVG text. There’s more to the <text> element.

Continue reading

How To Work With SVG Text

SVG text offers the best of both worlds. It’s rendered like other graphic elements so you can do things like add strokes and fills that you can add to shapes, lines, and arrowheads. It’s also packaged as XML character data, which means it’s real text.

Continue reading

How To Apply SVG Radial Gradients To A Fill Or Stroke

Like patterns, gradients can add depth and interest to a composition. Despite the current trend toward a flatter design aesthetic, gradients are still highly useful.

Continue reading