From http://www.w3schools.com (Copyright Refsnes Data)
ExampleAdd a special style to the first character of a paragraph:
Try it yourself » |
The :first-letter pseudo-element adds a style to the first character of a text.
Note: The following properties apply to the :first-letter pseudo-element:
Pseudo-elements can also be combined with CSS classes:
|
p.article:first-letter {color:#FF0000} <p class="article">A paragraph in an article</p> |
The example above will set the first letter of all paragraphs with class="article" to red.
![]()
The :first-letter pseudo-element is supported in all major browsers.
CSS tutorial: CSS Pseudo elements
Complete CSS Reference
From http://www.w3schools.com (Copyright Refsnes Data)