PEMBUATAN TABEL

Untuk membuat tabel dalam pemograman HTML terdapat beberapa perintah khusus seperti contoh berikut :

Contoh 1 :

<table border="4"> Make a Table <tr><th bgcolor="blue">Header 1<th bgcolor="red">Header 2 <tr><td bgcolor="yellow">Satu<td bgcolor="gold">dua <tr><td bgcolor="magenta" colspan="2"<em>Not Available</em> </table>

Hasil 1 :

Make a Table
Header 1Header 2
Satu dua
Not Available

Contoh 2 :

<TABLE border="1"> <CAPTION>Cups of coffee consumed by each senator</CAPTION> <TR><TH bgcolor="aquamarine">Name<TH>Cups<TH>Type of Coffee<TH>Sugar? <TR><TD bgcolor="aquamarine">T. Sexton<TD>10<TD>Espresso<TD>No <TR><TD bgcolor="aquamarine">J. Dinnen<TD>5<TD>Decaf<TD>Yes <TR><TD bgcolor="aquamarine">A. Soria<TD bgcolor="summer sky" colspan="3"><em>Not available</em>

Hasil 2 :

Cups of coffee consumed by each senator
NameCupsType of CoffeeSugar?
T. Sexton10EspressoNo
J. Dinnen5DecafYes
A. SoriaNot available

Contoh 3 :

<TABLE BORDER> <CAPTION>An Example of a Table</CAPTION> <TR><TH ROWSPAN=2 TH COLSPAN="2">average <TH>   <TH>   <TH>other</TR> <TR><TH> height <TH>weight <TH>category </TR> <TR><TH ALIGN=LEFT colspan=2>males <TD>1.9 <TD>.003 <TD>yyy </TR> <TR><TH ALIGN=LEFT colspan=2>females <TD>1.7 <TD>.002 <TD>xxx</TR> </TABLE>

Hasil 3 :

An Example of a Table
average     other
height weight category
males 1.9 .003 yyy
females 1.7 .002 xxx
To Menu