::after
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
Examples
span::after {
content: " Required";
}
Notes
Web authors are encouraged to use the two-colon form of the ::after pseudo-element.
Related specifications
- CSS 2.1
- W3C Recommendation
- Selectors Level 3
- W3C Recommendation
See also
Related pages
- contentcontent
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]