প্রিয় পাঠক আজ আমরা জানব HTML টেবিল Element এর ব্যবহার । টেবিল এইচটিএমএল এর একটি গুরুপ্তপূর্ণ উপাদান। যারা নতুন ওয়েব ডিজাইন শিখছেন তারা প্রথম টেবিল দিয়েই একটি ওয়েব সাইট তৈরী করতে পারবেন। HTML এ টেবিল তৈ্রীর System এবং লিস্ট তৈ্রীর System প্রায় একই রকম। টেবিল তৈ্রীর জন্য <table> ...</table> Tag ব্যবহার করা হয় এবং এই Tag এর সাথে <tr>...</tr>, (tr মানে হচ্ছে Table Row), <td>..</td> (td মানে হচ্ছে Table Data) , <th>....</th> (th মানে হচ্ছে Table Header) । এছাড়াও শিরোনাম দেওয়ার জন্য <caption>.....</caption> tag ব্যবহার করা হয় । একটি table এ সাধারনত ২ টি অংশ থাকে, Row এবং Column । Row এবং Column মিলে যেই ঘর তৈ্রী হয় তাকে Cell বলে। এছাড়াও প্রথম Row টি বা প্রথম Column টি Heading হিসাবে থাকতে পারে। আর এই সব ঘরের তথ্যকেই Table Data বলে।
নিচে কিছু Html Code দেওয়া হইল । আই Code গুলা আপনি Notepad এ Copy করে table .html নামে Save করে দেখতে পারেন কি হয়।
<table width=”500″ border=”1″ align=”center”>
<caption>This is HTML Table</caption>
<tr>
<th>First Column</th>
<th>Second Column </th>
<th>Third Column</th>
</tr>
<tr>
<td>This is First Cell </td>
<td>This is Second Cell</td>
<td>This is Third Cell</td>
</tr>
<tr>
<td>This is Fourth Cell</td>
<td>This is Fifth Cell</td>
<td>This is Sixth Cell</td>
</tr>
<tr>
<td>This is Seventh Cell</td>
<td>This is Eighth Cell</td>
<td>This is Ninth Cell</td>
</tr>
</table>
সবকিছু ঠিক থাকলে নিচের ইমেজের মত প্রদর্শণ করবে…
| html table tag |
নিচে কিছু Html Code দেওয়া হইল । আই Code গুলা আপনি Notepad এ Copy করে table .html নামে Save করে দেখতে পারেন কি হয়।
<table width=”500″ border=”1″ align=”center”>
<caption>This is HTML Table</caption>
<tr>
<th>First Column</th>
<th>Second Column </th>
<th>Third Column</th>
</tr>
<tr>
<td>This is First Cell </td>
<td>This is Second Cell</td>
<td>This is Third Cell</td>
</tr>
<tr>
<td>This is Fourth Cell</td>
<td>This is Fifth Cell</td>
<td>This is Sixth Cell</td>
</tr>
<tr>
<td>This is Seventh Cell</td>
<td>This is Eighth Cell</td>
<td>This is Ninth Cell</td>
</tr>
</table>
সবকিছু ঠিক থাকলে নিচের ইমেজের মত প্রদর্শণ করবে…
![]() |
| HTML Table |
জেনে রাখা ভালঃ
প্রতিটি <th> </th> এবং <td> </td> এর ভিতরের সকল ইলিমেন্টকে আমরা টেবিল সেল হিসেবে এবং সেলের ভিতরে সকল লিখাকে সেল ইলিমেন্ট হিসেবে জানবো। আপনি একটি টেবিলে যতগুলো রো নিতে চাইবেন তার জন্য আপনারে ততবার <tr> এবং </tr> ব্যবহার করতে হবে। প্রতিটি রো-তে সমান সংখ্যাক কলাম <td> </td>নিতে হবে। কোন রো-তে ৩ টি আবার কোন রো-তে ২টি কলাম নিয়ে কাজ করতে পারবেন না।
আজ এ পর্যন্তই। সবাই ভাল থাকেন। আল্লহা-হাফেজ
