Insert Content After an Element with CSS



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(/https/www.tutorialspoint.com/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>
Updated on: 2020-06-29T07:13:02+05:30

303 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements