property inheritance : Inheritance : Style Basics HTML CSS TUTORIALS


HTML CSS TUTORIALS » Style Basics » Inheritance »

 

property inheritance


 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title> Property Inheritance </title>
        <style type='text/css'>
          div#parentdiv {
            text-align: center;
          }
        </style>
    </head>
    <body>
    <div id='parentdiv'>
         Some text aligned center.
        <div>
            Because the text-align property is inherited, 
            this text is also aligned center.
        </div>
    </div>
    </body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Style Basics
» Inheritance