using the content element in css code example
Example 1: how use befor after for image
.custom_img:after {
content: "";
background-color: #2359cf;
height: 400px;
width: 70%;
top: -15px;
right: -6px;
position: absolute;
z-index: 999;
}
Example 2: css content property
CSS Syntax
content: normal|none|counter|attr|string|open-quote|close-quote|no-open-quote|no-close-quote|url|initial|inherit;
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style: none;
padding: 0;
margin: 0;
}
li {
padding-left: 16px;
}
li::before {
content: ">";
padding-right: 8px;
color: blue;
}
</style>
</head>
<body>
<h1>The content Property</h1>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>
</body>
</html>