Introduction
The table is used to display some data in a tabular, rows and columns format.
Syntax for creating the table is given below
- <table>
- <tr>
- <th>Table_Header1</th>
- <th>Table_Header2</th>
- </tr>
- <tr>
- <td>Cell_One</td>
- <td>Cell_Two</td>
- </tr>
- </table>
Here, <table> tag defines the Table, <tr>
tag defines Table Row, <th> tag defines Table Header(Column Header) and <td> tag
defines Table Column.
Now, we use these code to create a table by
writing the following code
- <!DOCTYPE HTML>
- <html>
- <head>
- <table>
- <tr>
- <th>Name</th>
- <th>Subject</th>
- </tr>
- <tr>
- <td>A. Kumar</td>
- <td>HTML</td>
- </tr>
- <tr>
- <td>B. Kumar</td>
- <td>.NET</td>
- </tr>
- </table>
- </body>
- </html>


Join the conversation! Your thoughts help the community grow.