Skip to main content
CSS is fun and cool and I like it.

Text Wrapping & Inline Pseudo Elements


::after / ::before

The ::after pseudo-element in CSS allows you to insert content onto a page without it needing to be in the HTML. While the end result is not actually in the DOM, it appears on the page as if it is, and would essentially be like this:

div::after {
  content: "hi";
  <!-- Rest of stuff inside the div -->

::before is exactly the same only it inserts the content before any other content in the HTML instead … Read article