Home / CSS Tips Generated By ChatGPT / Using :after and :before for Content Injection in CSS Inject content before or after an element’s content using :before and :after. Source Code .element:before { content: "Before "; } .element:after { content: " After"; }