A Tutorial For HTML Tables

Best viewed with Netscape 3.0+ @800X600


Next Page



Here are examples of tables followed by the actual html coding.
Do not attempt to look at the source code of these help documents—you will be confused.
These pages are intended to help people that are less familiar with HTML (Hypertext Markup Language) tables. If you really don't have the time to fully use these documents as guides, you can always cut and paste the coding. Familiarize yourself with the following chart first.




Basic Table Commands
<table></table> begins and ends the table
<tr></tr> table row--begins and ends a row
<td></td> table data--begins and ends data
Command attributes:
width=# or % sets width of table in pixels or percent
border=# sets the thickness of borderin pixels
cellpadding=# sets number of pixels between data and frame
cellspacing=# sets number of pixels between cells
colspan=# set number of columns to span
rowspan=# set number of rows to span
bgcolor=#?????? sets background color
valign=top/middle/bottom vertical align
align=left/center/right horizontal alignment





Full width table with one column and many rows

Roe vs. Wade (1973)
In this landmark case, the court ruled 7-2 that states could abridge a woman’s constitutional right to an abortion only after the first six months of pregnancy. The court established the following points:
The right to privacy includes the right to an abortion
Doe vs. Bolton (1973)
This companion ruling to Roe vs. Wade established what has become known as the “health” exception. In a 7-2 ruling the court held that a woman has a constitutional right to an abortion after six months if her doctor finds it “necessary for her physical or mental health.” The doctor could consider the patient’s age, physical, emotional, psychological and familial circumstances.
Planned Parenthood vs. Casey (1992)
In a 5-4 ruling the justices overturned Roe's trimester framework and its “strict scrutiny” standard. They replaced “strict scrutiny” with “undue burden,” giving states more autonomy in legislating abortion while preserving Roe's guarantee of general access.

The Court also endorsed a 24-hour waiting period; informed consent requirement; parental consent provision for minors and a recordkeeping requirement. The Court struck down a spousal notice requirement requested by the state of Pennsylvania, where the case originated.


The coding.

<table width=100% cellpadding=5 cellspacing=0>

<tr> <td bgcolor="#ddeeff" valign=top width=100%> <font size=3 face="arial," "helvetica" color="#000000">
<b>Roe vs. Wade (1973)</b> <br>
<font size=2 face="arial," "helvetica" color="#000000"> In this landmark case...<br></td></tr>

<tr><td bgcolor="#dddddd"> <font size=2 face="arial," "helvetica" color="#000000"> The right to privacy includes the right to an abortion<br> </td></tr> ...and so on </table>






One column, few rows, width=100.


Conditions with symptoms similar to those of ADHD
depression
hearing deficiencies
epilepsy
sleep apnea
learning disabilities


The coding:

<table width="100" cellspacing=0 border=0 cellpadding=2>

<tr><td valign=middle align=left hspace=4 bgcolor="#003399" width=100> <font face=arial color="#ffffff"size=2><b> <img src="/images/spacer.gif" width=1 height=1 hspace=65><BR> Conditions with symptoms similar to those of ADHD </b></font></td></tr>

<tr><td valign=middle align=left hspace=4 bgcolor="#ddddbb"> <font face=arial color="#333333"size=2><b> depression </b></font></td> </tr>

<tr><td valign=middle align=left hspace=4 bgcolor="#dddddd"> <font face=arial color="#333333"size=2><b> hearing deficiencies </b></font></td> </tr> ...and so on </table>








Timeline Table


BUSANG GOLD
March 93
Bre-X Minerals Ltd starts gold exploration in Busang, an area of rain forest and rugged hills on Borneo island.
October 95

Company estimates area could contain more than 30 million ounces of gold.


The coding:

<table width="100" cellspacing=0 border=0 cellpadding=3 align=top valign=top>

<tr><td valign=middle align=left hspace=4 bgcolor="#ddeeff" width=100>
<img src="/images/spacer.gif" width=2 height=1 hspace=50><br> <font face=arial color="#333333"size=2>
<IMG SRC="images/spacer.gif" width=1 height=1 hspace=50 vspace=4> <b>BUSANG GOLD</b> <IMG SRC="images/spacer.gif" width=1 height=1 hspace=50 vspace=4> </font></td></tr>

<tr><td valign=middle align=right hspace=4 bgcolor="#eeeeee"> <font face=arial color="#3366cc"size=2><b> March 93</b> </font></td></tr>

<tr><td valign=middle align=left hspace=4 bgcolor="#eeeeee"> <font face=arial color="#333333"size=1>Bre-X Minerals Ltd starts... </font></td></tr>

<tr><td valign=middle align=right hspace=4 bgcolor="#ddeeff"> <font face=arial color="#3366cc"size=2> <b>October 95</b></td></tr>

<tr><td valign=middle align=left hspace=4 bgcolor="#ddeeff" width=100> <img src="/images/spacer.gif" width=2 height=1 hspace=50><br> <font face=arial color="#333333"size=1> Company estimates area... </font></td></tr> ...and so on </table>






One Column, many rows, width=150


DISTRICT BY DISTRICT
District 1
Employment increased in many sectors. Commercial real estate improved. Strong retail sales.
District 2
Home building slowed. Labor market tightened. Demand for loans increased.
District 3
Manufacturing activity edged up. Slowdown in auto sales.
The coding:
<table width="150" cellspacing=0 border=0 cellpadding=2>

<tr><td valign=middle align=left hspace=4 bgcolor="#003399" width=200> <font face=arial color="#ffffff"size=2><b> <img src="/images/spacer.gif" width=1 height=1 hspace=100><BR> DISTRICT BY DISTRICT </b></font></td></tr>

<tr><td valign=middle align=left hspace=4 bgcolor="#c7d2e2"> <font face=arial color="#333333"size=2><b> District 1 </b></font></td> </tr>

<tr><td valign=middle align=left hspace=4 bgcolor="#9393bc"> <font face=arial color="#333333"size=1><b> Employment increased... </b></font></td> </tr> ...and so on </table>






One column, many rows, width=180

TOP HOLDINGS
China Fund
as of March 31
Shanghai Industrial Holdings
New World Development
Asia Pacific Fund
as of Feb. 28
Cheung Kong Holdings
Development Bank of Singapore
The coding:

<table width="180" border=0 cellspacing=0 cellpadding=4 hspace=2 align=left>
<tr><td valign=middle align=left hspace=4 bgcolor="#003867" width=150> <font face=arial color="#ffffff"size=4><b> TOP HOLDINGS</b> </b></font></td>
<td width=10 rowspan=7><img src="/images/spacer.gif" width=2 height=1 hspace=4></td></tr>

<tr><td valign=middle align=left hspace=4 bgcolor="#9bb3d3"> <font face=arial color="#333333"size=3><b> China Fund<BR> <font face=arial color="#333333"size=2> as of March 31</b></td><tr>

<tr><td valign=middle align=left hspace=4 bgcolor="#ddeeff"> <font face=arial color="#333333"size=2><b> Shanghai Industrial Holdings</b></td></tr>

<tr><td valign=middle align=left hspace=4 bgcolor="#dddddd"> <font face=arial color="#333333"size=2><b> New World Development</b></td></tr> ...and so on</table>


Next Page

Copyright © hirashh@abc.com