h1::first-letter : header.class « CSS « HTML / CSS






h1::first-letter

 



<!DOCTYPE html PUBLIC "-/pp/W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title></title>
        <style type='text/css'>
            h1::first-letter, p::first-letter {
                text-transform: capitalize; 
            }
            h1 {
                font-weight: normal;
                text-align: center;
                text-decoration: underline;
            }
            p {
                text-indent: 25px;
                text-align: justify;
                letter-spacing: 1px;
                word-spacing: 5px;
            }
            p::first-letter {
                font: 120%;
            }
        </style>
    </head>
    <body>
        <h1>this is the title</h1>
        <p>This is a test. </p>
    </body>
</html>

 








Related examples in the same category

1.h1#top::before, h1#top::after: content: "::";