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

Text Wrapping & Inline Pseudo Elements

Almanac

::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";
}
<div>
  <!-- Rest of stuff inside the div -->
  hi
</div>

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