Easy Tutorial
❮ Css3 Pr Row Gap Sel In Range ❯

CSS :first-letter Selector

Complete CSS Selector Reference

Example

Styling the first letter of each <p> element:


Definition and Usage

The :first-letter selector is used to specify the style of the first letter of an element.

Tip: The :first-letter selector can use the following properties:

Note: The "first-letter" selector only works with block-level elements.


Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Selector
::first-letter 1.0 9.0 <br> Partial from 5.5 1.0 1.0 7.0 <br> Partial from 5.5

Note: IE 5.5-8 and Opera 4-6 only support the old syntax standard, single-colon CSS2 syntax (:first-letter). Newer versions support the double-colon CSS3 syntax (::first-letter).


Related Pages

CSS Tutorial: CSS Pseudo-elements


Complete CSS Selector Reference

❮ Css3 Pr Row Gap Sel In Range ❯