After knowing all about basics of HTML tags try to make your web page. For making a web page there is need for creating table, forms, inserting images, text, and more. So, for creating a web page first of all we started to create table in HTML.
By hearing the name of table one thing came in mind that for crating table we need two things "columns" and "rows" that are basics. In HTML, table is defined by table tag and the content of rows and columns are defined table data tag. Before creating table in HTML first we give a look on table tags that are:
| Tag Name | Description |
| <table> | This tag is used to define table |
| <th> | This tag is used for giving heading to your table i.e. table header |
| <tr> | This tag is used for making entry in table rows |
| <td> | This tag is used for inserting an value by defining table rows |
| <tbody> | This tag is used for defining the body of table |
| <thead> | This tag is used for defining table head |
| <tfoot> | This tag defines the footer of table |
| <caption> | This tag is used for defining caption in table |
| <col> | This tag is used for defining one or more column values in table |
| <colgroup> | This tag is used for defining group of columns in table |
So, after giving a short look on these table tags start to create a table and the basic code for creating table as:
<html>
<head>
<title>my table</title>
<body>
<table border="1">
<tr>
<th>Sr.No.</th>
<th>Name</th>
<th>Deparment</th>
<th>Salary</th>
</tr>
<tr>
<td>1</td>
<td>John</td>
<td>General Manager</td>
<td>100000</td>
</tr>
<tr>
<td>2</td>
<td>Smith</td>
<td>Manager</td>
<td>80000</td>
</tr>
<tr>
<td>3</td>
<td>Clark</td>
<td>Team Leader</td>
<td>50000</td>
</tr>
</table>
</body>
</html>
In your web browser it will look like this:
| Sr.No. | Name | Deparment | Salary |
| 1 | John | General Manager | 100000 |
| 2 | Smith | Manager | 80000 |
| 3 | Clark | Team Leader | 50000 |
So, copy this code into your notepad, save it with HTML extension then open it in your web browser and try to editing it for making yourself stronger to create table.
No comments:
Post a Comment