← home page

How to set width for paragraphs using CSS ch unit

Blog posted on March 15 2023

Paragraphs have a sweet spot for best readability around 50 - 70 characters width. So instead of using pixel values for max-width, use CSS character units instead. It has been supported on almost all browsers since 2013 (see sources).

CSS

p { max-width: 70ch; }

Resources

← home page