Table in HTML
A html table defined with <table> tag.
Every rows started with <tr> End with </tr>
Header is mentioned by <th> and data cell of table defines with <td>
Example :
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Manikandan</td>
<td>Thiyagarajan</td>
<td>39</td>
</tr>
<tr>
<td>Ambrose</td>
<td>Jackson</td>
<td>60</td>
</tr>
</table>
CSS for border of table :
table, th, td {
border: 1px solid black;}
border: 1px solid black;}
Full HTML Example for Table:
<!DOCTYPE html>
<HEAD>
<TITLE>Web Development Example</TITLE>
<meta charset="UTF-8">
</HEAD>
<HEAD>
<TITLE>Web Development Example</TITLE>
<meta charset="UTF-8">
</HEAD>
<style>
table, th, td {
border: 1px solid black;}
border: 1px solid black;}
</style>
<BODY>
<table width="100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Manikandan</td>
<td>Thiyagarajan</td>
<td>39</td>
</tr>
<tr>
<td>Ambrose</td>
<td>Jackson</td>
<td>60</td>
</tr>
</table>
</BODY>
</html>
<table width="100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Manikandan</td>
<td>Thiyagarajan</td>
<td>39</td>
</tr>
<tr>
<td>Ambrose</td>
<td>Jackson</td>
<td>60</td>
</tr>
</table>
</BODY>
</html>
Result of the above example:
:
In this article, you write good information. This information I much needed to changes in Web Development.
ReplyDelete