Little Web Hut
(Cascading Style Sheets) CSS 2.1 Reference

CSS Pseudo-element :after Selector

 

What is a CSS Pseudo-element :after Selector?

  • The :after pseudo-element selector allows content to be generated after the specified element. The content property is used to specify the content which will be generated. In the following example, an image will be displayed after the end of each <p> element.
CSS Example:
  p:after {content: url("../images/dots.gif");}
  <p>An image should be generated after this text.</p>
  <p>An image should be generated after this text.</p>
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style