text-anchor property
Aligns a string of text relative to the specified point.
This property is read/write.
![]() ![]() |
Syntax
text-anchor: start | middle | end | inherit
Property values
One of the following values:
start-
The start of the text is aligned at the initial text position.
middle-
The geometric middle of the text is aligned at the initial text position.
end-
The end of the text is aligned at the initial text position.
inherit-
Use the computed value of this property from an ancestor element.
CSS information
| Applies To | text content elements |
|---|---|
| Media | visual |
| Inherited | 1 |
| Initial Value | start |
Standards information
- Scalable Vector Graphics: Text, Section 10.9.1
Remarks
As of Microsoft Edge, this presentation attribute is animatable with CSS Animations and CSS Transitions.
Each text element has an initial current text position, defined as a point in the user coordinate system.
See also
Show:

