vertical-align

Sets the vertical alignment of an inline or table-cell element. It's commonly used to align icons with text or to center content inside a table cell.

Quick example

.icon {
  /* Aligns the middle of the icon with the middle of the text line */
  vertical-align: middle;
}

Quick facts

Initial value
baseline
Inherited
No
Applies to
inline-level and table cell elements
Animation type
length

Values

baselinesubsupertext-toptext-bottommiddletopbottom

vertical-align Browser Support

Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

Safe to use without fallbacks.

1+
1+
1+
12+
ESC