---
title: "Polishing your typography with line height units"
description: "The CSS `lh` and `rlh` units, supported in all major browsers since 2023, equal the current element's line height and the root line height respectively."
url: "https://swe.quest/articles/polishing-your-typography-with-line-height-units-8042fe3893cde84b"
canonical: "https://webkit.org/blog/16831/line-height-units/"
source: "WebKit"
published: "2025-04-24"
difficulty: "medium"
kind: "How-to"
reading_minutes: 3
tags: ["css","frontend"]
---

# Polishing your typography with line height units

A post on [WebKit](https://swe.quest/sources/webkit.md), published 2025-04-24, 3 min read, How-to. Original: [https://webkit.org/blog/16831/line-height-units/](https://webkit.org/blog/16831/line-height-units/)

## Summary

The CSS \`lh\` and \`rlh\` units, supported in all major browsers since 2023, equal the current element's line height and the root line height respectively. Setting paragraph margins to \`1lh\` instead of the traditional \`1em\` keeps paragraph spacing aligned to the text's line grid, producing a more consistent vertical rhythm. The units also work for padding, gaps and other dimensions. With about 94% browser support, a fallback declaration in \`em\` before the \`lh\` one gives a progressive-enhancement path.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [CSS](https://swe.quest/tags/css.md) (Web & mobile)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)

## Prerequisites

- CSS units ([easy posts on CSS](https://swe.quest/tags/css.md?difficulty=easy))
- CSS box model ([easy posts on CSS](https://swe.quest/tags/css.md?difficulty=easy))

## Keywords

lh unit, rlh unit, CSS, WebKit

## Related posts

- [Better typography with text-wrap pretty](https://swe.quest/articles/better-typography-with-text-wrap-pretty-a217707b284078fd.md): WebKit · 2025-04-08 · Medium · 16 min read · CSS, Browsers, Frontend
  WebKit's implementation of \`text-wrap: pretty\` in Safari Technology Preview 216 evaluates the whole paragraph rather than one line at a time.
- [Release Notes for Safari Technology Preview 243](https://swe.quest/articles/release-notes-for-safari-technology-preview-243-b654215c3d2767b1.md): WebKit · 2026-05-07 · Medium · 18 min read · Browsers, CSS, Accessibility, JavaScript
  Safari Technology Preview 243 ships WebKit changes 310600@main through 312007@main for macOS Tahoe and Sequoia.
- [New to the web platform in June](https://swe.quest/articles/new-to-the-web-platform-in-june-7816d4d94fd092d9.md): web.dev · 2026-06-30 · Easy · 4 min read · Browsers, CSS, Frontend, Accessibility
  Chrome 149, Chrome 150 and Firefox 152 reached stable in June 2026.
- [WebKit Features in Safari 17.5](https://swe.quest/articles/webkit-features-in-safari-17-5-db83d5ba970a4034.md): WebKit · 2024-05-13 · Medium · 9 min read · CSS, Browsers, Frontend
  Safari 17.5 ships seven features and 22 bug fixes, led by CSS additions: text-wrap: balance (with the text-wrap-style longhand), the light-dark() color function, @starting-style for entry transitions, and supports() conditions on @import rules.
- [WebKit Features in Safari 16.4](https://swe.quest/articles/webkit-features-in-safari-16-4-4fda9eefaadc5c33.md): WebKit · 2023-03-27 · Medium · 38 min read · Browsers, CSS, Frontend, Mobile
  Safari 16.4 ships 135 new web features and over 280 polish updates.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
