text vertical align top and bottom : vertical align : Box Model HTML CSS TUTORIALS


HTML CSS TUTORIALS » Box Model » vertical align »

 

text vertical align top and bottom


 

<!DOCTYPE html PUBLIC "-//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'>
                {
                    background: cyan;
                    margin: 10px;
                    font-size: 16px;
                }
                span {
                    font-weight: bold;
                    background: lightblue;
                }
                span > span {
                    font-size: 40px;
                    color: white;
                    background: steelblue;
                }
                span + span {
                    font-size: 20px;   
                }
                span#text-top {
                    vertical-align: text-top;
                }
                span#top {
                    vertical-align: top;
                }
                span#text-bottom {
                    vertical-align: text-bottom;
                }               
                span#bottom {
                    vertical-align: bottom;
                }
            </style>
        </head>
        <body>
            <p>
                <span>
                   A
                        <span id='text-top'>A</span> 
                        <span id='top'>A.</span>
                </span>
            </p>
            <p>
                <span>
                    A
                        <span id='text-bottom'>A</span>
                        <span id='bottom'>A</span>
                </span>
            </p>
        </body>
    </html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Box Model
» vertical align