table


table will be used to represent the content in a structure. i.e. by rows and columns. table will be having header, rows and cells.

  • table -> represents table
  • th -> represents table header cell
  • tr -> represents table row
  • td -> represents table cell

Syntax:

<table><tr><td>Content here...</td></tr></table>

Example:

<html> <head> <title>HTML Tutorial</title> </head> <body> <table border="1"> <tr> <th> Employee Name </th> <th> Department </th> <th> Designation </th> </tr> <tr> <td> Jhon Thomas </td> <td> Accounts </td> <td> Executive </td> </tr> <tr> <td> Williams </td> <td> Finance </td> <td> Manager </td> </tr> </table> </body> </html>

Output:

Employee Name Department Designation
Jhon Thomas Accounts Executive
Williams Finance Manager