Skip to content
Related Articles
Open in App
Not now

Related Articles

How to create a table by using HTML5 ?

Improve Article
Save Article
  • Last Updated : 23 Sep, 2020
Improve Article
Save Article

An HTML table is defined using the “table” tag in the HTML page. Each table row is defined with the “tr” tag. A table header is defined with the “th” tag. By default, table headings are bold and centered. A table data or cell is defined with the “td” tag.


<table> Contents... </table>



<!DOCTYPE html>
        body {
            text-align: center;
        h1 {
            color: green;
        th {
            color: blue;
        td {
            border: 1px solid black;
            border-collapse: collapse;
            HTML5: How to define a table?
                <!-- tr tag starts here -->
                    <th>User Id</th>
                <!-- tr tag end here -->


Supported browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!