::before css comes after code example

Example 1: :before css

h2:before { 
    content: "Read: ";
    color: #F00;
}

Example 2: css after before

/*
	"before" & "after" are pseudo-contents.
	They end up *into* the tag they are declared for.
	They are just right "before" or "after" the *content* of tag they're in.
	Declare their "content" CSS rule to make them visible.
*/
div::before			/* 
|here|Content of tag
*/ { content: "|here|"; } div::after /*
Content of tag|here|
*/ { content: "|here|"; } /* Double-colon should be used: it's the meant pseudo-content operator. IE8 doesn't support it though: it supports single-colon (meant for pseudo-selectors). So IE8 support needs the following: div:before { ... } div:after { ... } */

Tags:

Misc Example