HTML
  Home arrow HTML arrow Page 3 - HTML Tables
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

HTML Tables
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-01-30

    Table of Contents:
  • HTML Tables
  • Headings in Tables
  • Spanning More than One Row or Column
  • Using Tags Inside of Tables
  • Cellpadding and Cellspacing
  • Setting Backgrounds in Tables and Cells
  • Aligning Data within Your Cells

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    HTML Tables - Spanning More than One Row or Column


    (Page 3 of 7 )

    It's possible to span data across more than one row or column. The code below shows how to do so:


    <html>

    <body>

    <h2>Creating a Cell that Spans Two Columns:</h2>

    <table border="1">

    <tr>

    <th>Name</th>

    <th colspan="2">Sons</th>

    <th colspan="3">Daughters</th>

    </tr>

    <tr>

    <td>Bruce Lee</td>

    <td>Ug Lee</td>

    <td>Brandon Lee</td>

    <td>Sara</td>

    <td>Tara</td>

    <td>Farrah</td>

    </tr>

    </table>

    <h2>Creating a Cell that Spans Two Rows:</h2>

    <table border="1">

    <tr>

    <th>Name:</th>

    <td>Bruce Lee</td>

    </tr>

    <tr>

    <th rowspan="2">Sons:</th>

    <td>Ug Lee</td>

    </tr>

    <tr>

    <td>Brandon Lee</td>

    </tr>

    </table>

    </body>

    </html>

    This is how the code will appear on the users browser:


      Creating a Cell that Spans Two Columns:

    Name

    Sons

    Daughters

    Bruce Lee

    Ug Lee

    Brandon Lee

    Sara

    Tara

    Farrah

      Creating a Cell that Spans Two Rows:

    Name:

    Bruce Lee

    Sons:

    Ug Lee

    Brandon Lee

    More HTML Articles
    More By James Payne


       · Thanks for stopping by to read my article on HTML tables, where we discuss a...
     

    HTML ARTICLES

    - Using a 3D HTML Table as a Recordset
    - Building a 3D HTML Table
    - Maximizing and Restoring HTML Images: Layer ...
    - Completing Construction of a Database Form w...
    - Maximizing and Restoring Images in a Tabular...
    - Building the Recordset for an HTML Database ...
    - Laying Out a Database Form with HTML
    - Tabular Database Form Functions with HTML
    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT