HTML table is used to define tables on the web page which shows the data in tabular form.
Name | Email Id | Phone No | Age |
---|---|---|---|
Aditi Musunur | abd.happel@autozone-inc.info | (392) 181-8544 | 34 |
Advitiya Sujeet | garne-endres@progressenergyinc.info | (375) 585-3565 | 23 |
Alagesan Poduri | ly_cha@progressenergyinc.info | (683) 734-4276 | 45 |
Amrish Ilyas | yeva.brye@progressenergyinc.info | (791) 729-0692 | 28 |
Aprativirya Seshan | shgd@gmail.com | (375) 585-3565 | 13 |
Asvathama Ponnada | maria@gmail.com | (524) 386-5730 | 32 |
Debasis Sundhararajan | ander@mail.com | (268) 508-9243 | 35 |
Gopa Trilochana | starstuff@live.com | (950) 926-1612 | 24 |
Jitendra Choudhary | chance@outlook.com | (950) 926-1612 | 40 |
Naveen Tikaram | jrkorson@yahoo.ca | (272) 211-7370 | 44 |
The table is divided into Rows and Columns.
Rows are horizontally aligned which contains one or more columns.
Columns are vertically aligned which contains one or more rows.
All the rows and columns come inside <table> tag.
A row is define by <tr> tag.
Column contains table data which are define by <th> tag and <td> tag.
<th> tag is used to define table heading. It makes the text bold which increase the importance of text.
<td> tag is used to define normal table data.
Run the code to see the effect.
HTML border attribute is used to give a border to a table.
HTML Border Attribute is defined by border="value" syntax.
Value can be 0,1,2,3 and more.
0 is by default which shows no border.
1,2,3 and more adds the border around the cell (A cell is a block which contains single data in the table).
Run the code to see the effect.
To extend the one column into several columns we used colspan attribute.
Run the code to see the effect.
To extend the one row into several rows we used rowspan attribute.
Run the code to see the effect.
To add a caption (summary of table) to a table, use the <caption> tag.
The <caption> tag must be inserted immediately after the <table> tag.
Run the code to see the effect.