initial-letter
Limited availability93% of users
A modern way to create 'drop caps' (large first letters at the start of a paragraph). You can specify how many lines high the letter should be and how many lines it should sink into the text.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyComingNot in Firefox or Safari yet, so not every major browser supports it.
The old way and the modern waySee the snippet: Drop caps without float hacks →
Old way 6 lines
.drop-cap::first-letter {
float: left;
font-size: 3em;
line-height: 1;
margin-right: 8px;
}Modern 5 lines
.drop-cap::first-letter {
-webkit-initial-letter: 3;
initial-letter: 3;
}
/* Standard; -webkit- prefix needed for Safari. */See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
normal- Inherited
- No
- Applies to
- ::first-letter pseudo-elements and inline-level first children
- Animation type
- byComputedValueType
Quick example
.intro-text::first-letter {
/* Makes the first letter 3 lines tall */
initial-letter: 3;
margin-right: 1.5rem;
}Values
normalRelated snippet
Drop caps without float hacksTypography →initial-letter browser support
BaselineLimited availabilityThis feature is not Baseline because it does not work in some of the most widely-used browsers.Not ready for production without a fallback.
Usage93%of people can use this7% use a browser without it.
Browsers
110+
110+Mobile
110+Android