Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Basic Tables

  • Well, as I know you know by now, basic HTML does not actually give you much control over where things go on your page.

  • For the most part, the browser gets to determine placement and you are left simply communicating general layout instructions.

  • However with the introduction of HTML 3.2 in 1996 came the first really powerful tools for HTML layout: Tables.

  • Tables give you the ability to position elements in your page with much greater accuracy.

  • Of course, the original intent of HTML Tables was to provide a way to present tabular data in rows and columns.

  • Thus the first tables looked something like the following:

Column One Header Column Two Header
Row One/Column One Row One/Column Two
Row Two/Column One Row Two/Column Two

  • A table is composed of several tags that are outlined in the table below:

OPENING/CLOSING TAG DESCRIPTION
<TABLE>...</TABLE> Specifies an HTML table. (By default the table will have no borders)
<TR>...</TR> Specifies a Table Row
<TH>...</TH> Specifies a Table Header Cell
<TD>...</TD> Specifies a Table Data Cell

  • Thus, the following code would create the very basic table that was shown previously:
<HTML>
<HEAD>
<TITLE>Table Example</TITLE>
</HEAD>
<BODY>
<TABLE>

<TR>
<TH>Column One Header</TH>
<TH>Column Two Header</TH>
</TR>

<TR>
<TD>Row One/Column One</TD>
<TD>Row One/Column Two</TD>
</TR>

<TR>
<TD>Row Two/Column One</TD>
<TD>Row Two/Column Two</TD>
</TR>
</TABLE>
</BODY>
</HTML>

  • One thing to keep in mind about tables is that you may include any Body HTML (i.e. markup that can go in the Body tag) in a table cell, including tables. Thus you could make the contents of a cell bold with the following table cell definition:

<TD><B>This text is bold</B></TD>

Additional Resources:

Exercise Eight
Introduction to Web Design | Table of Contents
Table Attributes


Up to => Home / Authoring / HTML / Tutorial




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers