Text alignment properties
The 'text-anchor' property is used to align (start-, middle-
or end-alignment) a string of text relative to a given point.
| 'text-anchor'
property |
Value: |
start | middle | end | inherit
|
Initial: |
start |
Applies to: |
content elements |
Inherited: |
yes |
Percentages: |
N/A |
Media: |
visual |
Animatable: |
yes |
Values
have the following meanings: |
| start |
The rendered characters are aligned
such that the start of the text string is at the initial
current text position. For Latin or Arabic, which
is usually rendered horizontally, this is comparable
to left alignment. For Asian text with a vertical
primary text direction, this is comparable to top
alignment.
|
middle |
The rendered characters are aligned such that the
middle of the text string is at the current text position.
(For text on a path, conceptually the text string
is first laid out in a straight line. The midpoint
between the start of the text string and the end of
the text string is determined. Then, the text string
is mapped onto the path with this midpoint placed
at the current text position.)
|
end |
The rendered characters are aligned such that the
end of the text string is at the initial current text
position. For Latin text in its usual orientation,
this is comparable to right alignment. |
|