CSS - Pseudo-element :after


        Advertisements

        Description

        The :after pseudo-element is used to insert some content after an element.

        Example

        Following is the example which demonstrates how to use :after element to add some content after any element.

        <html>
           <head>
              <style type = "text/css">
                 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> 
        

        This will produce following black link −

        css_references.htm
        Advertisements