>> English << | česky | PortuguêsZVON > Tutorials > CSS2 tutorial
>> Example 48 << | Prev | Next | Index | Contents

An element can be displayed as a block or inline. If the element display property is not specified, inline display is assumed.

XML SourceCSS stylesheetExample link
(1)
     <AAA>
          <BBB>
               <CCC>ccc</CCC>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <DDD>ddd</DDD>
               <EEE>eee</EEE>
               <EEE>eee</EEE>
          </BBB>
          <BBB>
               <CCC>ccc</CCC>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <DDD>ddd</DDD>
               <EEE>eee</EEE>
               <EEE>eee</EEE>
          </BBB>
     </AAA>

BBB {display:block}
CCC {display: inline}
DDD {display: inline}
EEE {display: inline}
View output
XML SourceCSS stylesheetExample link
(2)
     <AAA>
          <BBB>
               <CCC>ccc</CCC>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <DDD>ddd</DDD>
               <EEE>eee</EEE>
               <EEE>eee</EEE>
          </BBB>
          <BBB>
               <CCC>ccc</CCC>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <DDD>ddd</DDD>
               <EEE>eee</EEE>
               <EEE>eee</EEE>
          </BBB>
     </AAA>

BBB {display:block}
CCC {display: inline}
DDD {display:block}
EEE {display: inline}
View output