Which element is used to insert some content after an element with CSS

CSSWeb DevelopmentFront End Technology

Use the :after element to add some content after an element. 

Example

You can try to run the following code to insert some content after an element with CSS −

Live Demo

<html>
   <head>
      <style>
         p:after
         {
            content: url(/images/bullet.gif)
         }
      </style>
   </head>
   <body>
      <p> This line will be succeeded by a bullet.</p>
      <p> This line will be succeeded by a bullet.</p>
      <p> This line will be succeeded by a bullet.</p>
   </body>
</html>
raja
Published on 30-Apr-2018 12:48:03
Advertisements