Little Web Hut
(Cascading Style Sheets) CSS 2.1 Reference

CSS Pseudo-element :first-line Selector

 

What is a CSS Pseudo-element :first-line Selector?

  • The :first-line pseudo-element selector specifies the first line of an element. This selector applies to block container elements. In the following example, the color property will be set to red for the first line of every <p> element.
CSS Example:
  p:first-line {color: red;}
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style