EnglishFrenchGermanSpainItalianDutchRussianPortugueseJapaneseKoreanArabicChinese Simplified

Jumat, 21 Januari 2011

Membuat tabel pada HTML dengan mengatur ukurannya

Postingan kali ini sama dengan postingan sebelumnya namuntabel ini dengan format yang lain dengan absolut dan dinamis.

ini adalah script tabel pertama
<table border="1" width="400" height="300">
    <tr>
        <td  colspan="2" width="400" height="50" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">1</td></font>
    </tr>


    <tr>
        <td width="50" height="250" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">2</td></font>
        <td width="350" height="250" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">3</td></font>
    </tr>
</table>

script tabel yang ke dua


<table border="1" width="100%" height="100%">
    <tr>
        <td rowspan="2" width="20%" height="100%" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">1</td></font>
        <td width="80%" height="20%" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">2</td></font>
    </tr>
    <tr>
        <td width="80%" height="80%" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">3</td></font>
    </tr>
</table>

script tacel ketiga

<table border="1" width="100%" height="300">
    <tr>
        <td colspan="3" width="100%" height="50" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">1</td></font>
    </tr>
    <tr>
        <td width="20%" height="200" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">2</td></font>
        <td width="60%" height="200" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">3</td></font>
        <td width="20%" height="200" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">4</td></font>
    </tr>
    <tr>
        <td colspan="3" width="100%" height="50" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">5</td></font>
    </tr>
</table>

script tabel yang keempat

<table border="1" width="100%" height=400">
    <tr>
        <td colspan="2" width="70%" height="20%" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">1</td></font>
        <td rowspan="2" width="30%" height="200" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">2</td></font>
    </tr>
    <tr>
        <td rowspan="2" width="35%" height="80%" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">3</td></font>
        <td width="35%" height="40%" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">4</td></font>
    </tr>
    <tr>
        <td width="35%" height="200" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">5</td></font>
        <td width="30%" height="200" align="center" bgcolor="#66FFFF"><font face="Comic Sans MS" color="#000000">6</td></font>
    </tr>
</table>


Tabel pertama
1
2 3

Tabel kedua
1 2
3

Tabel ketiga
1
2 3 4
5

tabel ketiga

1 2
3 4
5 6

1 komentar: