CSS Drop Caps with the initial-letter Property

Drop caps without float hacks

The old way used float, a large font-size, and manual line-height and margin, and it broke across browsers. initial-letter gives you a real drop cap in one property.

Old way 8 lines
.drop-cap::first-letter   {  float: left;  font-size: 3em;  line-height: 1;  margin-right: 8px;}
Modern
4 lines
.drop-cap::first-letter   {  -webkit-initial-letter: 3;  initial-letter: 3;}/* Standard; -webkit- prefix needed for Safari. */
Limited availability 91% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Not ready for production without a fallback.

110+
9+
110+
initial-letter creates the drop cap

Once upon a time, CSS had no way to create a proper drop cap without hacks. Now one property handles the sizing, the alignment, and the line spanning. No floats, no magic numbers.

One property

No float, no guessing font-size or line-height. You say how many lines the letter sinks and the browser does the rest.

Stable layout

Initial-letter is designed for drop caps. Wrapping and alignment stay consistent across browsers.

Optional raise

initial-letter: 3 2 means sink 3 lines and raise 2. You get control without fragile hacks.

Lines Saved
8 → 4
50% less code
Old Approach
Float + font-size
Line-height and margin tweaks
Modern Approach
initial-letter
One property, proper drop cap

How it works

The old way: style ::first-letter with float: left, a big font-size (e.g. 3em), line-height: 1, and margin-right to clear the text. It kind of worked but line wrapping and alignment varied by browser and font, and you had to tweak by eye.

The modern way: set initial-letter: 3 (or another number). The number is how many lines the letter sinks into. The browser sizes and positions it correctly. Use two values, e.g. 3 2, for sink and raise. Safari requires the -webkit- prefix. One property, predictable result.

ESC