MDN The alignment-baselineCSS property specifies the specific baseline used to align the box's text and inline-level contents. Baseline alignment is the relationship among the baselines of multiple alignment subjects within an alignment context. When performing baseline alignment, the alignment-baseline property value specifies which baseline of the box is aligned to the corresponding baseline of its alignment context.
Syntax
baseline | <baseline-metric>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
baseline
Applies to
inline-level boxes, flex items, grid items, table cells, and SVG text content elements
Inherited
no
Percentages
N/A
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting alignment-baseline
Chrome
1
Edge
79
Firefox
149
Safari
5.1
Chrome Android
18
Safari iOS
5
First version with support, from MDN browser-compat-data.
MDN The baseline-shiftCSS property repositions the dominant-baseline of a text element relative to the dominant-baseline of its parent text content element. The shifted element might be a sub- or superscript. If the property is present, the value overrides the element's baseline-shift attribute.
MDN The baseline-sourceCSS property defines which baseline to use when inline-level boxes have multiple possible baselines, such as multi-line inline blocks or inline flex containers. The values allow for choosing between aligning to the box's first baseline, last baseline, or letting the browser decide automatically based on the box type.
MDN The dominant-baselineCSS property specifies the specific baseline used to align the box's text and inline-level contents. It also indicates the default alignment baseline of any boxes participating in baseline alignment in the box's alignment context. If present, it overrides the shape's dominant-baseline attribute.
Syntax
auto | <baseline-metric>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
block containers, inline boxes, table rows, grid containers, flex containers, and SVG text content elements
Inherited
yes
Percentages
N/A
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting dominant-baseline
Chrome
1
Edge
79
Firefox
1
Safari
4
Chrome Android
18
Safari iOS
3.2
First version with support, from MDN browser-compat-data.
MDN The initial-letterCSS property sets the size and sink for dropped, raised, and sunken initial letters. This property applies to ::first-letter pseudo-elements and inline-level first children of block containers.
<p class="normal">Initial letter is normal</p><p class="onefive">Initial letter occupies 1.5 lines</p><p class="three">Initial letter occupies 3 lines</p>
Syntax
normal | <number [1,∞]> <integer [1,∞]> | <number [1,∞]> && [ drop | raise ]?
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
normal
Applies to
certain inline-level boxes and ::first-letter and inside ::marker boxes (see prose)
Inherited
no
Percentages
N/A
Computed value
the keyword normal or a number paired with an integer
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting initial-letter
Chrome
110
Edge
110
Firefox
No
Safari
9 (-webkit- prefix)
Chrome Android
110
Safari iOS
9 (-webkit- prefix)
First version with support, from MDN browser-compat-data.
PropertyBaseline: widely availablesince January 2018
MDN The line-heightCSS property sets the height of a line box in horizontal writing modes. In vertical writing modes, it sets the width of a line box. It's commonly used to set the distance between lines of text. On block-level elements in horizontal writing modes, it specifies the preferred height of line boxes within the element, and on non-replaced inline elements, it specifies the height that is used to calculate line box height.
<section id="default-example"> <div class="transition-all" id="example-element"> Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun. </div></section>
Syntax
normal | <number [0,∞]> | <length-percentage [0,∞]>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
normal
Applies to
non-replaced inline boxes and SVG text content elements
Inherited
yes
Percentages
computed relative to 1em
Computed value
the specified keyword, a number, or a computed <length> value
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting line-height
Chrome
1
Edge
12
Firefox
1
Safari
1
Chrome Android
18
Safari iOS
1
First version with support, from MDN browser-compat-data.
MDN The text-boxCSSshorthand property corresponds to the text-box-trim and text-box-edge properties, which together specify the amount of space to trim from the block-start edge and block-end edge of a text element's block container.
Spec The <text-edge> value, which identifies specific font metrics, expands to
MDN The <text-edge>enumerateddata type defines keywords that specify font metrics representing specific regions on a font's block-start edge and block-end edge. Each keyword specifies a position of a font's over and/or under edge.
Syntax
[ text | ideographic | ideographic-ink ] | [ text | ideographic | ideographic-ink | cap | ex ] [ text | ideographic | ideographic-ink | alphabetic ]
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Browser support
First browser version supporting <text-edge>
Chrome
133
Edge
133
Firefox
Preview
Safari
18.2
Chrome Android
133
Safari iOS
18.2
First version with support, from MDN browser-compat-data.