Justification

Another common typographic adjustment is text alignment. In certain instances, you may wish to have multiple lines of text align along their centers or their right edges. To accommodate this urge, you can use the text-anchor style. This property is defined with the syntax

text-anchor:x
					

where x is one of three values: start, middle, or end. The first value, start, rarely needs to be applied, as it is the assumed value. (Every example you've seen thus far automatically started the text from the leftmost edge.) The middle value centers the text, and the end value aligns the right (or “end”) edges. All of these values refer to alignment of the text according to the x and y attribute values of the text's text or tspan elements.

To ...

Get Sams Teach Yourself SVG in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.