The HTML tables allow web authors to arrange data like text, images, links, other tables, etc. into rows and columns of cells.

The HTML tables are created using the <table> tag in which the <tr> tag is used to create table rows and <td> tag is used to create data cells. The elements under <td> are regular and left aligned by default.

Table Heading

Table heading can be defined using <th> tag. This tag will be put to replace <td> tag, which is used to represent actual data cell. Normally you will put your top row as table heading as shown below, otherwise you can use <th> element in any row. Headings, which are defined in <th> tag are centered and bold by default.

Colspan and Rowspan Attributes

You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows.


Example:


Output:

HTML Tables Example

Basic Table

Sr No. Employee Name Designation
1 Azher Software Engineer
2 Faizan Software Engineer
3 Zeeshan Software Engineer
4 Zoya Software Engineer

Colspan Table

Sr No. Name Subject
1 Azher Maths1 Maths2
2 Faizan Science1 Science2
3 Zeeshan Science1 Science2
4 Zoya Maths1 Maths2

Rowspan Table

Sr No. Employee Name Address
1 Azher Nagpur Maharashtra
2 Faizan pune
3 Zeeshan Mumbai
4 Zoya Nagpur
Do you Know?
Progamming is what actually means ?

What is software development ?

How we categorized software development in different manner.

C Programming
C Plus Plus
Python
Java Development
Web Designing
Javascript
Mysql
Oracle
We cover all the programming concepts in various programming languages, this tutorials are very help full for bigener as well as Experience developer, for the ease of understanding we categorized programming in different manner likewise.