:: ˹èÇ·Õè 6 ¡ÒÃÊÃéÒ§µÒÃÒ§ (Table)
¡ÒÃáºè§ÊèǹµÒÃÒ§


¡ÒÃáºè§ÊèǹµÒÃÒ§

㹡ÒÃáÊ´§¼Å¢éÍÁÙÅã¹µÒÃÒ§ ÊèǹãË­è¤×ÍÊèǹ¢Í§¢éÍÁÙÅáÅÐÊèǹËÑÇ·Õè¨ÐáÊ´§¤ÇÒÁËÁÒ¢ͧ¢éÍÁÙÅ «Öè§ÊèǹËÑǨеéͧÍÂÙè´éÒ¹º¹¢Í§µÒÃÒ§·Õèãªéá·ç¡ th «Öè§ä´éàÃÕ¹ÃÙ»ä»ã¹ËÑÇ¢éÍ·Õè¼èÒ¹ÁÒ

áµèàÃÒÊÒÁÒöáºè§ÊèǹµÒÃÒ§ÍÍ¡à»ç¹ 3 Êèǹ ä´é´Ñ§¹Õé

á·ç¡ thead (Table Header) ÊèǹËÑǵÒÃÒ§
á·ç¡ tbody (Table Body) Êèǹ¢éÍÁÙÅã¹µÒÃÒ§
á·ç¡ tfoot (Table Footer) ÊèǹÊÃØ»ÃÇÁ¢éÍÁÙÅã¹µÒÃÒ§

â´Â·Ñé§ÊÒÁÊèǹàÃÒäÁèµéͧàÃÕ§ÅӴѺ¡Ñ¹¡çä´é áµèµÍ¹áÊ´§¼ÅºÃÒÇà«ÍÃì¨ÐàÃÕ§ÅӴѺ¡ÒÃáÊ´§¼ÅµÒÁá·ç¡thead,tbodyáÅÐtfoot àªè¹ ÍÒ¨ÇÒ§á·ç¡ tfoot ÁÒ¡è͹á·ç¡ tbody áµèàÁ×èÍáÊ´§¼Åá·ç¡ tbody ¡ç¶Ù¡áÊ´§¡è͹á·ç¡ tfoot àËÁ×͹à´ÔÁ


Tag
ª×èÍá·ç¡ thead, tbody áÅÐ tfoot
µÓá˹è§á·ç¡ ÍÂÙèÀÒÂã¹á·ç¡<table>...</table>
ÃٻẺ¡ÒÃãªéá·ç¡ <thead><tr><td>...</td></tr></thead>
<tbody><tr><td>...</td></tr></tbody>
<tfoot><tr><td>...</td></tr></tfoot>


µÑÇÍÂèÒ§¡ÒÃãªé§Ò¹
<body>


<table align="left" cellspacing="1" width="300">
    <caption>¡ÒÃáºè§ÊèǹµÒÃÒ§</caption>
    <tfoot bgcolor="#e0096e">
        <tr> <td>Êèǹ·éÒÂ</td> <td>Êèǹ·éÒÂ</td> </tr>
    </tfoot>
    <thead bgcolor="#096de9">
         <tr> <td>ÊèǹËÑÇ</td> <td>ÊèǹËÑÇ</td></tr>
    </thead>
    <tbody bgcolor="#109b93">
        <tr> <td>Êèǹà¹×éÍËÒ·Õè1</td> <td>Êèǹà¹×éÍËÒ·Õè1</td></tr>
        <tr> <td>Êèǹà¹×éÍËÒ·Õè1</td> <td>Êèǹà¹×éÍËÒ·Õè1</td></tr>
    </tbody>
    <tbody bgcolor="#4fd8d0">
        <tr> <td>Êèǹà¹×éÍËÒ·Õè2</td> <td>Êèǹà¹×éÍËÒ·Õè2</td></tr>
        <tr> <td>Êèǹà¹×éÍËÒ·Õè2</td> <td>Êèǹà¹×éÍËÒ·Õè2</td></tr>
    </tbody>
</table>

</body>

¡ÒÃáÊ´§¼Å

¡ÒÃáºè§µÒÃÒ§à»ç¹ÊèÇ¹æ ·ÓãËéàÃÒÊÒÁÒöµ¡áµè§µÒÃÒ§ä´é§èÒÂæ â´ÂàÃÒÊÒÁÒö¡Ó˹´ÃٻẺ ¢¹Ò´µÑÇÍÑ¡Éà ÊÕ¾×é¹ËÅѧà¾Õ§¤ÃÑé§à´ÕÂÇ ¡ç¨Ð·ÓãËé¢éÍÁÙÅ·ÕèÍÂÙèã¹Êèǹ¹Ñé¹·Ñé§ËÁ´ ÃѺÃٻẺ·ÕèàÃÒµ¡áµè§äÇéä»ãªé ÍÕ¡·Ñé§ÂѧÊдǡ㹡ÒÃá¡éä¢â¤é´ HTML ã¹ÀÒÂËÅѧ à¾ÃÒÐàÃÒÊÒÁÒöÊѧࡵä´éÇèÒ¤èÒ·Õè¼Ô´ã¹µÒÃÒ§¨Ñ´à¡çºÍÂÙèã¹Êèǹ㴠«Ö觨ЪèÇÂÂè¹àÇÅÒ㹡Òäé¹ËÒÊèǹ·Õèµéͧ¡ÒÃá¡éä¢ä´é㹡óշÕèµÒÃÒ§ÁÕ¢¹Ò´ãË­èÁÒ¡æ