::after

Jump to: navigation, search

::after

This article is Ready to Use.


W3C Recommendation

Summary

Inserts content after the selected element(s).


The ::before and ::after pseudo-elements specify the location of content before and after an element in the document tree. The content attribute, in conjunction with these pseudo-elements, specifies what is inserted. The generated content interacts with other boxes as if they were real elements inserted just inside their associated element. The content box of the associated element expands to include the generated content, if necessary.

Syntax

sel ::after

Parameters

sel
A simple selector


Compatibility

There is no data available for topic "css", feature "::after". If you think that there should be data available, consider opening an issue.

Examples

CSS

span::after { 
  content: " Required";
}

Notes

Web authors are encouraged to use the two-colon form of the ::after pseudo-element.


Related specifications

Specification Status Related Changes
CSS 2.1 W3C Recommendation
Selectors Level 3 W3C Recommendation

See also

Related pages

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]