Represents the first line of an element. Note that the content of the first line varies depending on the available width and the styling of text (size, spacing).
Syntax::first-line {}
Usage
The ::first-line pseudo-element can be attached to block-level elements. It can be attached to inline elements if you set the corresponding display property to block.
ExamplesThe following example puts the first line of any paragraph in bold text
p::first-line {
font-weight: bold;
}
Notes Remarks
Only the following properties apply to the ::first-letter pseudo-element: background, clear, color, font, font-family, font-size, font-style, font-variant, font-weight, line-height, text-decoration, text-transform, vertical-align, and word-spacing
Related specificationsMicrosoft Developer Network.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4