In real world applications, tables are widely used to display organization data. In HTML too we can create our own Table with columns, headers and rows. With the help of query functions in JavaScript we can even add rows and columns to these tables at runtime.

Tables in HTML

To display table in HTML we use <table> tag. For each row we use <tr> tag [tr stands for table row] and for each header and column we use <th> [table “” not found /]
and <td> [table “” not found /]
tag respectively. This can be easily understood by given syntax and example:


HTML Table Syntax

Here we have use these tags:

Tag Meaning Description
<table>…</table> HTML Table tag It defines the starting and ending of table
<tr>…</tr> Row tag It adds rows within the table
<td>…</td> Column tag It adds columns within the row
<th>…</th> Header tag It adds headers within the row


HTML Table Example


HTML Table Output

Note: You might be missing table border here. Table border comes under CSS section, which will be covered later.



  • Barry Allen

    A Full Stack Developer with 10+ years of experience in different domain including SAP, Blockchain, AI and Web Development.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.