<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>CSS: Blocks Within Inlines (XHTML Version)</title>
  <style type="text/css">
   td { border: solid black; color: white; padding: 0; background: red; }
   .inline { display: inline; background: teal; }
   .block { display: block; background: green; }
   .a, .c { background: teal; }
   .b { background: green; }
  </style>
 </head>
 <body>
  <p>The following two boxes should look identical.</p>
  <table>
   <tr>
    <td>
     <div class="inline">Line 1<div class="block">Line 2</div>Line 3</div>
    </td>
    <td>
     <div class="a">Line 1</div>
     <div class="b">Line 2</div>
     <div class="c">Line 3</div>
    </td>
   </tr>
  </table>
 </body>
</html>
