first-line (:first-line)

The ::first-line CSS pseudo-element applies styles only to the first line of an element. The amount of the text on the first line depends of numerous factors, like the width of the elements or of the document, but also of the font size of the text. As all pseudo-elements, the selectors containing ::first-line does not match any real HTML element.

<!DOCTYPE html>
<html>
    <head>
        <style>
            p:first-line {
                background-color: yellow;
				color:#C33;
            }
        </style>
    </head>
    <body>
        <p>
            The quick brown red fox jumps over the lazy dog<br>
            The quick brown red fox jumps over the lazy dog<br>
            The quick brown red fox jumps over the lazy dog<br>
            The quick brown red fox jumps over the lazy dog
        </p>
		
		<p>
            The quick brown red fox jumps over the lazy dog<br>
            The quick brown red fox jumps over the lazy dog<br>
            The quick brown red fox jumps over the lazy dog<br>
            The quick brown red fox jumps over the lazy dog
        </p>
    </body>
</html>