<div class="pseudo-element">
<p>
This is Sample Text. <br>
Here we are demonstrating usage of pseudo elements
</p>
</div>
body{
background: #1f1f1f;
width: 80%;
border: 1px dashed #ffffff;
margin: auto;
padding: 50px;
color: #ffffff;
}
div{
display: flex;
justify-content: center;
}
/* first-line selector */
p::first-line{
background-color: orange;
color: black;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.