Set text color to red, for the first line of the <p> element. - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set text color to red, for the first line of the <p> element.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
p::first-line {<!--from www.  j  a  v  a 2 s.c om-->
    color: red;
}
</style>
</head>
<body>

<p>This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.</p>

</body>
</html>

Related Tutorials