How do you create a table in HTML?

Query By: SHWATI HK

S

Shuresh Verma

What is an HTML table?

An HTML table is a combination of multiple tags like <table>, <thead>, <tbody>, <tr>, <th>, <td>, and <tfoot> tags. All upper listed tags are used in between the <table> open_tag and </table> close_tag. For more understanding OR more information about table tags with table syntax and how to create an HTML table; So, see the HTML table syntax example below:


Important HTML Table Tags To Create A Perfect HTML Table LIke

  • <table> </table> -- TABLE tag is used to start OR define an HTML table
  • <thead> </thead> -- THEAD tag used to Define TABLE head
  • <tbody> </tbody> -- TBODY tag used to Define TABLE body
  • <tr> </tr> -- TR tag used to Define TABLE row
  • <th> </th> -- TH tag used to Define TABLE row heading
  • <td> </td> -- TD tag used to Define TABLE columns
  • <tfoot> </tfoot> -- TFOOT tag used to Define TABLE footer


Syntax of HTML Table OR How to Create an HTML Table

<table>

<thead>Table head section</thead>

<tbody>

    <tr> // Open_tag of table row

        <th>cotent for row header section...</th>

        <td>cotent for row-column section...</td>

    </tr> // Close_tag of table row

</tbody>

<tfoot> // Open_tag of table footer

    <tr><td>cotent for footer section...</td></tr>

</tfoot> // Close_tag of table footer

</table>

1 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)