HTML Table - HTML List - Phptpoint.com

HTML Table

/ins>

Create HTML Table

HTML Tables is used to preset data in rows and columns format.
A Table is the collection of rows and rows is the collection of columns.
<tr> stands for table rows.To add a row in a table table row tags are used.
<TD> is used to put the column inside the row.

Syntax


HTML Table rows

<tr> tag represents html table rows.

Eg


HTML Table columns

<td> or <th> tag represents html table columns .<td> means table data and <th> means table head

Eg

In the above example
a table is created have 3 rows and 6 columns where each row contains 2 column.
<tr> tag is used to create a row while <td> or <th> is used to create column.
<tr> comes in between <table> tag while <td> or <th> comes in between <tr>.


How to merge table column

When you want to merge 2 or more then 2 column(cell) , use colspan Property of <td colspan=”2″> or <th colspan=”2″>
Eg



How to merge table rows

When you want to merge 2 or more then 2 rows in a single row , use rowspan Property of <td rowspan=”2″> or <th rowspan=”2″>
Eg


Nested Table

Nested table means how to use table inside a table.
Multiple times you need to use table inside a table. when you want to use a table inside a table write the syntax of table in between your cell i.e eighter <td> or <th> .