HTML Table

Let us learn how to create table, it will make how content more organize in a way when using to display records to users.

  • <table></table> table
  • <th></th> table header
  • <tr></tr> table row
  • <td></td> data/details to be display on the page.

 

Fruit

Quantity

Sales

Cost

Apple

100

$0.20

$0.05

Pear

80

$0.15

$0.03

Orange

200

$0.21

$0.08

Peach

115

$0.80

$0.50

Mango

120

$1.30

$0.90

 

<table>

<tr>

<th>

Fruit

</th>

<th>

Quantity

</th>

<th>

Sales

</th>

<th>

Cost

</th>

</tr>

<tr>

<td>

Apple

</td>

<td>

100

</td>

<td>

$0.20

</td>

<td>

$0.05

</td>

</tr>

<tr>

<td>

Pear

</td>

<td>

80

</td>

<td>

$0.15

</td>

<td>

$0.03

</td>

</tr>

<tr>

<td>

Orange

</td>

<td>

200

</td>

<td>

$0.21

</td>

<td>

$0.08

</td>

</tr>

<tr>

<td>

Peach

</td>

<td>

115

</td>

<td>

$0.80

</td>

<td>

$0.50

</td>

</tr>

<tr>

<td>

Mango

</td>

<td>

120

</td>

<td>

$1.30

</td>

<td>

$0.90

</td>

</tr>

</table>

 

Footer