<div class="pseudo-element">
    <p> This is Sample Text.</p>
</div>
body{
  background: #1f1f1f;
  width: 80%;
  border: 1px dashed #ffffff;
  margin: auto;
  padding: 50px;
  color: #ffffff;
}

div{
  display: flex;
  justify-content: center;
}

/* before selector */
 p::before{
    content: "content";
    background: red;
 }

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.