Before and After Pseudo Selectors
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>HTML/XHTML: » Before and After Pseudo Selectors</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">
a {text-decoration: none;}
a:hover {color: red; }
.external:after {content: "asdfasdf"; margin-left: .2em;}
.warning:before {content: "Warning!"; background-color: yellow; border-style: dashed; border-width: 1px; margin-right: 1em;}
.warning:after {content: "**"; background-color: yellow; border-style: dashed; border-width: 1px; margin-left: 1em;}
blockquote:before {content: open-quote;}
blockquote:after {content: close-quote;}
</style>
</head>
<body>
<div class="head">Before and After Pseudo Selectors</div>
<div class="content">
<a href="#">local link</a><br />
<a href="http://www.htmlref.com" class="external">external link</a>
<br /><br />
<div class="warning">This is dangerous XHTML example text.
This is a test.
Finally!</div>
<blockquote>
I am a blockquote. To be or not to be a blockquote, that is the overused
quotation style question.
</blockquote>
</div>
</body>
</html>
Related examples in the same category