Name

:first-letter — IE4 N/N | IE5 N/Y | NN4 N/N | Op3 Y/-

Synopsis

Applies styles to the first letter of an element. This pseudo-class can be used to generate drop-cap effects, among other things.

Example

P:first-letter {color: purple;}
    <P>The capital 'T' at the beginning of this paragraph is purple.</P>

Values

n/a

Default

n/a

Inherited

yes

Applies to

block

Get Cascading Style Sheets: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.