Heapcoding

How to create table in html

Published July 1, 2022

In this tutorial I shall teach you how to create table in html. Let’s start the tutorial without wasting your time.

Step 1 – Create a blank html document with basic tags

First of all create a blank html document with some basic head and body tags

How to create table in html
How to create table in html

In the above screenshot you can see I have created a basic document.

Step 2 – Create table with rows and columns

Now let’s create a table in the html document.

How to create table in html
How to create table in html

In the above screenshot you can see I have created a table with a single row and two cols.

The “thead” tag is used to declare table header.

And the “tbody” tag is used to declare table body.

And there are the “th” and “td” columns in the header and body of the table.

Congratulations you have successfully created the table in the html document.