Complete CSS Selector Reference
Insert content before every <p> element's content:
The :before selector inserts content before the content of the selected element(s).
Use the content property to specify the content to insert.
![]()
The :before selector is supported in all major browsers.
Note: For :before to work in IE8, a <!DOCTYPE> must be declared.
CSS tutorial: CSS Pseudo-elements
CSS Selector Reference: CSS :after selector
Insert content before every <p> element's content, and style the inserted content:
Complete CSS Selector Reference
Your message has been sent to W3Schools.