Example of HTML Table Rowspan and Colspan - HTML CSS HTML

HTML CSS examples for HTML:Table Column

Description

Example of HTML Table Rowspan and Colspan

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head> 
  <title>Example of HTML Table Rowspan and Colspan</title> 
 </head> <!--  ww  w . ja v a  2  s.  c o m-->
 <body> 
  <h2>Example of Table Rowspan</h2> 
  <table border="1"> 
   <tbody>
    <tr> 
     <th rowspan="4">Users Info</th> 
    </tr> 
    <tr> 
     <td>1</td> 
     <td>Mary</td> 
     <td>mary@mail.com</td> 
    </tr> 
    <tr> 
     <td>2</td> 
     <td>Tom</td> 
     <td>tom@mail.com</td> 
    </tr> 
    <tr> 
     <td>3</td> 
     <td>Jack</td> 
     <td>jack@mail.com</td> 
    </tr> 
   </tbody>
  </table> 
  <h2>Example of Table Colspan</h2> 
  <table border="1" cellpadding="10"> 
   <tbody>
    <tr> 
     <th colspan="3">Users Info</th> 
    </tr> 
    <tr> 
     <td>1</td> 
     <td>Mary</td> 
     <td>mary@mail.com</td> 
    </tr> 
    <tr> 
     <td>2</td> 
     <td>Tom</td> 
     <td>tom@mail.com</td> 
    </tr> 
    <tr> 
     <td>3</td> 
     <td>Jack</td> 
     <td>jack@mail.com</td> 
    </tr> 
   </tbody>
  </table>   
 </body>
</html>

Related Tutorials