p::first-letter : p.class « CSS « HTML / CSS

HTML / CSS » CSS » p.class 
p::first-letter
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title> Albert Einstein </title>
        <style type='text/css' media='all'>
            p::first-letter {
                font-size: 200%;
                background-color: red;
                border: 1px solid black;
            }
            p::first-line {
                letter-spacing: 5px;
            }

        </style>
    </head>
    <body>
            <p>
This is a test. This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. This is a test. 
            </p>
    </body>
</html>

 
Related examples in the same category
1.p::first-letter: font-style: italic
2.p::first-line: letter-spacing: 5px;
3.p.abstract:after content
4.p.QuickTip:before
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.