Wednesday, 23 July 2014

HTML TABLES

HTML TABLES

  • Tables are defined with the <table> tag.
  • A table is divided into rows with the <tr> tag. 
  • A row is divided into data cells with the <td> tag.
  • A row can also be divided into headings with the <th> tag. 
  • The <td> elements can contain all sorts of HTML elements like text, images, lists, other tables, etc.

Let we want to write  a HTML code for given table


ABCD15
PQRS10

So HTML Code for this table is


<table border="1" style="width: 300px;">
<tbody>
<tr>
<td>AB</td><td>CD</td>
<td>15</td></tr>
<tr>
<td>PQ</td><td>RS</td><td>10</td></tr>
</tbody>
</table>


NOTE


Here border and width will change according to the requirement & we can add more row on the table. 

0 comments:

Post a Comment