Elements – Table Tag


Table Tag

The <table> tag allows you to display a table on your webpage.

Example

<table> <thead> <tr> <th>Full Name</th> <th>Job Role</th> <th>Location</th> </tr> </thead> <tbody> <tr> <td>Sherlock Holmes</td> <td>Detective</td> <td>London</td> </tr> <tr> <td>Harry Potter</td> <td>Wizard</td> <td>Godric's Hollow</td> </tr> <tr> <td>Winnie the Pooh</td> <td>Honey Taster</td> <td>Five Hundred Acre Wood</td> </tr> </tbody> </table>

This code block would produce the following output:

Full NameJob RoleLocation
Sherlock HolmesDetectiveLondon
Harry PotterWizardGodric’s Hollow
Winnie the PoohHoney TasterFive Hundred Acre Wood

More Information:

MDN

This article needs improvement. You can help improve this article. You can also write similar articles and help the community.