CSS :after Selector
ExampleHow to insert content after all <p> elements:
Try it yourself » |
Definition and Usage
The :after selector inserts content after the selected element(s).
Use the CSS content property to specify the content.
Read more about the content property in our content property reference.
Browser Support
The :after selector is supported in all major browsers.
Note: For :after to work in IE, a <!DOCTYPE> must be declared.
CSS Version
The :after selector was first introduced in:
CSS 2
Related Pages
CSS tutorial: CSS Pseudo-elements
CSS Selector Reference: CSS :before selector
Try it Yourself - Examples |
ExampleStyle the inserted content:
Try it yourself » |
Complete CSS Reference