Complex table rowspan and colspan - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Row

Description

Complex table rowspan and colspan

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
td {<!-- w  w w.  j a v  a 2s .com-->
   padding:11px;
   text-align:center;
   background:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <table border="1" cellpadding="0" cellspacing="0" width="100%"> 
   <tbody> 
    <tr> 
     <td>Lorem ipsum</td> 
     <td>Lorem ipsum</td> 
     <td>Lorem ipsum</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsum</td> 
     <td colspan="2">Lorem ipsum</td> 
    </tr> 
    <tr> 
     <td rowspan="2">Lorem ipsum</td> 
     <td colspan="2">Lorem ipsum</td> 
    </tr> 
    <tr> 
     <td colspan="2" rowspan="2">Lorem ipsum<br>Lorem ipsum</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsum</td> 
    </tr> 
    <tr> 
     <td colspan="3" rowspan="3">Lorem ipsum<br>Lorem ipsum</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials