p:after {content: "You need to register to read the full article."; color:#ff0000;} : p.after « Tags « HTML / CSS






p:after {content: "You need to register to read the full article."; color:#ff0000;}

    

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>CSS Example</title>
<style type='text/css'>
h1 {font-size:18pt;}

p {font-size:12pt;}

p.abstract:after {content: "You need to register to read the full article."; color:#ff0000;}
</style>

</head>

<body>
<h1>Beginning Web Programming</h1>
<p class="abstract">This book teaches you how to write HTML. </p>
</body>
</html>

   
    
    
    
  








Related examples in the same category

1.p:after content:
2.p.price:after {content: " Postage and packaging included"}