using the content element in css code example

Example 1: how use befor after for image

/* for child  */

.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; /* Remove HTML bullets */
  padding: 0;
  margin: 0;
}

li { 
  padding-left: 16px; 
}

li::before {
  content: ">"; /* Insert content that looks like bullets */
  padding-right: 8px;
  color: blue; /* Or a color you prefer */
}
</style>
</head>
<body>

<h1>The content Property</h1>

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Coca Cola</li>
</ul>

</body>
</html>

Tags:

Css Example