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.

.icon {
  /* Aligns the middle of the icon with the middle of the text line */
  vertical-align: middle;
}
Initial value
baseline
Inherited
No
Applies to
inlineLevelAndTableCellElements
Animation type
length

Values

baselinesubsupertext-toptext-bottommiddletopbottom
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