Easy Tutorial
❮ Css3 Pr Border Image Repeat Pr Grid Row ❯

CSS :first-line Selector

Complete CSS Selector Reference

Example

Styling the first line of each <p> element:


Definition and Usage

The :first-line selector is used to apply styles to the first line of a selector.

Note: The :first-line selector can use the following properties:

Note: The "first-line" selector applies to block-level elements.


Browser Support

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

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

Related Articles

CSS Tutorial: CSS Pseudo-elements


Complete CSS Selector Reference

❮ Css3 Pr Border Image Repeat Pr Grid Row ❯