HTML and CSS Reference
In-Depth Information
Name
::first-letter
Generates:
A pseudo-element that contains the first letter of an element
Description:
This is used to style the first letter of an element. Any leading punctuation should be styled
along with the first letter. Some languages have letter combinations that should be treated as
a single character, and a user agent may apply the first letter style to both. Prior to CSS2.1,
:first-letter could be attached only to block-level elements. CSS2.1 expanded its scope to
include block, list-item, table-call, table caption, and inline-block elements. There is a limited
set of properties that can apply to a first letter.
Examples:
h1:first-letter {font-size: 166%;}
p:first-letter {text-decoration: underline;}
Search WWH ::




Custom Search