# CSS Cap Unit

DevFeed: [CSS Cap Unit](<https://devfeed.tech/articles/css-cap-unit-45279.md>)

Original publisher: [Read original article](<https://ishadeed.com/article/css-cap-unit/>)

Author: Ahmad Shadeed

Published: 2024-06-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ahmad Shadeed](<https://devfeed.tech/sources/ahmad-shadeed.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [modern web development](<https://devfeed.tech/topics/modern-web-development.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [layout](<https://devfeed.tech/topics/layout.md>)

Tags: [css](<https://devfeed.tech/tags/css.md>), [design](<https://devfeed.tech/tags/design.md>), [layout](<https://devfeed.tech/tags/layout.md>)

## AI overview

A practical CSS tutorial explaining how to use the cap unit to size elements to the height of uppercase letters. It compares fixed sizing and the ex unit, then shows additional uses for text alignment and outlines.

## Source excerpt

A look at how I solved a design problem with CSS cap unit.