baseline-shift

« SVG Attribute reference home

The baseline-shift attribute allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent text content element. The shifted object might be a sub- or superscript.

As a presentation attribute, it also can be used as a property directly inside a CSS stylesheet, see css baseline-shift for further information.

Usage context

Categories Presentation attribute
Value auto | baseline | super | sub | <percentage> | <length> | inherit
Animatable Yes
Normative document SVG 1.1 (2nd Edition)
baseline
There is no baseline shift; the dominant-baseline remains in its original position.
sub
The dominant-baseline is shifted to the default position for subscripts.
super
The dominant-baseline is shifted to the default position for superscripts.
<percentage>
The resulting value of the property is this percentage multiplied by the line-height of the <text> element. The dominant-baseline is shifted in the shift direction (positive value) or opposite to the shift direction (negative value) of the parent text content element by the resulting value. A value of "0%" is equivalent to "baseline".
<length>
The dominant-baseline is shifted in the shift direction (positive value) or opposite to the shift direction (negative value) of the parent text content element by the <length> value. A value of "0cm" is equivalent to "baseline".

Example

TBD

Elements

The following elements can use the baseline-shift attribute

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, davve, Jeremie
 Last updated by: chrisdavidmills,