Home arrow HTML arrow Page 3 - HTML Tables
HTML

HTML Tables


In our last tutorial we discussed how to create different types of frames and position them on the page. We also covered the various types of lists we can create. And I even let you in on a little recipe in my plot to make you fatter than me. In this tutorial we will go over tables (you will need a place to put that dinner I told you how to make after all) and how to insert them into your web pages.

Author Info:
By: James Payne
Rating: 4 stars4 stars4 stars4 stars4 stars / 4
January 30, 2008
TABLE OF CONTENTS:
  1. · HTML Tables
  2. · Headings in Tables
  3. · Spanning More than One Row or Column
  4. · Using Tags Inside of Tables
  5. · Cellpadding and Cellspacing
  6. · Setting Backgrounds in Tables and Cells
  7. · Aligning Data within Your Cells

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

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


blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials