Easy Tutorial
❮ Css Websafe Fonts Css3 Pr Font Stretch ❯

CSS :after Selector

Complete CSS Selector Reference

Example

Insert content after every <p> element:


Definition and Usage

The :after selector inserts content after the last child of the selected element.

Use the content property to specify the content to be inserted.


Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Selector
::after 4.0 9.0 <br> Partial from 8.0 3.5 3.1 7.0 <br> Partial from 4.0

Note: :after works in IE8, but a <!DOCTYPE> must be declared.


Related Articles

CSS Tutorial: CSS Pseudo-elements

CSS Selector Reference: CSS :before Selector


More Examples

Example

Insert content and style after each <p>:

❮ Css Websafe Fonts Css3 Pr Font Stretch ❯