html table tag web design



Tables are used to present web site information beautifully. Now we will see how to create a table.

The tags <table>, <tr>, <th>, <td> are used to create tables.

Here <tr> means table row.

<th> means table head.

<td> means table data.


Example of table tag:


<! DOCTYPE html>

<html lang = "en">

<head>

<title> Table Example </title>

</head>

<body>

<table border = "1">

<tr>

<th> Table Head 1 </th>

<th> Table Head 2 </th>

<th> Table Head 3 </th>

</tr>

<tr>

<td> Data 1 </td>

<td> Data 1 </td>

<td> Data 1 </td>

</tr>

<tr>

<td> Data 2 </td>

<td> Data 2 </td>

<td> Data 2 </td>

</tr>

<tr>

<td> Data 3 </td>

<td> Data 3 </td>

<td> Data 3 </td>

</tr>

<tr>

<td> Data 4 </td>

<td> Data 4 </td>

<td> Data 4 </td>

</tr>

<tr>

<td> Data 5 </td>

<td> Data 5 </td>

<td> Data 5 </td>

</tr>

</table>

</body>

</html>

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.