HTML Table Tags

The table is defined using the <table> and </table> tags.
Tables consist of columns and rows that are created using the following tags:

<tr> TABLE ROWS </tr> this tag is used to create rows in a table
<th> TABLE HEADER </th> this tag is used to create table header
<td> TABLE DATA </td> this tag is used to create a table cells for a table data

<caption> TABLE CAPTION </caption> tag defines the caption (or title) of a table. This tag must be inserted immediately after the <table> tag




HTML Tables Examples


 <table>  
<caption>GEOGRAPHICAL OVERVIEW</caption>
  <tr>
    <th>country</th>
    <th>capital</th> 
    <th>currency</th>
  </tr>
  <tr>
    <td>America</td>
    <td>Washington</td>
    <td>dollar</td>
  </tr>
  <tr>
    <td>Russia</td>
    <td>Moscow</td>
    <td>ruble</td>
  </tr>
  <tr>
    <td>Germany</td>
    <td>Berlin</td>
    <td>euro</td>
  </tr>
  <tr>
    <td>China</td>
    <td>Beijing</td>
    <td>yuan</td>
  </tr>
  <tr>
    <td>India</td>
    <td>New Delhi</td>
    <td>rupee</td>
  </tr>
</table> 



GEOGRAPHICAL OVERVIEW
country capital currency
America Washington dollar
Russia Moscow ruble
Germany Berlin euro
China Beijing yuan
India New Delhi rupee






 <table border="1">  
<caption>GEOGRAPHICAL OVERVIEW</caption>
  <tr>
    <th>country</th>
    <th>capital</th> 
    <th>currency</th>
  </tr>
  <tr>
    <td>America</td>
    <td>Washington</td>
    <td>dollar</td>
  </tr>
  <tr>
    <td>Russia</td>
    <td>Moscow</td>
    <td>ruble</td>
  </tr>
  <tr>
    <td>Germany</td>
    <td>Berlin</td>
    <td>euro</td>
  </tr>
  <tr>
    <td>China</td>
    <td>Beijing</td>
    <td>yuan</td>
  </tr>
  <tr>
    <td>India</td>
    <td>New Delhi</td>
    <td>rupee</td>
  </tr>
</table> 



GEOGRAPHICAL OVERVIEW
country capital currency
America Washington dollar
Russia Moscow ruble
Germany Berlin euro
China Beijing yuan
India New Delhi rupee







Privacy Policy