CSS Selector :first-line
Description
The :first-line
selector adds a style to
the first line of the specified selector.
Example
<!DOCTYPE html>
<html>
<head>
<style>
p:first-line{<!-- ww w . ja va2 s. c om-->
background-color:red;
}
</style>
</head>
<body>
<p>This is a paragraph. This is a paragraph. This is a paragraph.
This is a paragraph. This is a paragraph. This is a paragraph.
This is a paragraph. This is a paragraph. This is a paragraph.
This is a paragraph. This is a paragraph. This is a paragraph. </p>
</body>
</html>
The code above generates the following result.