The table in HTML is used to contains data and data alignment. In simple table rows and columns are available also in the HTML table contains the rows and columns.
To create we use the tag.
Some important tags that used in Table -
-
tag indicate the table row .
- | Tag used for table heading .
- It refers to table data also used to create columns in a table .
- To give the table height .
- It used to give the table width .
Let's learn with an example.
HTML Table
<!DOCTYPE html>
<html>
<head>
<title>HTML Table </title>
</head>
<body>
<table height="150" width="500" border="1">
<tr>
<td>
Employee Name
</td>
<td>
Ramesh
</td> >
<td>
Vikash
</td> <td>
Sheema
</td> <td>
Suresh
</td>
</td> <td>
Reetu
</td>
</tr>
<tr>
<td>
Salary
</td>
<td>
10000
</td>
<td>
15000
</td> <td>
20000
</td> <td>
12000
</td>
<td>
25000
</td>
</tr>
</table>
</body>
</html>
Run
How to - HTML Table -Steps
1. First of all use the table tag -
3.Write table heading and close the table handing and also table row , | ,.
4. If you want to create column then use the tag- and closing tag - |
Attributes - height and width.
5. End at the last close the table tag-
Techno Smarter Developer
Need help with a website or app? We build scalable web & mobile solutions and help businesses turn ideas into working products.
Get quick expert guidance.
Free consultation • Fast reply
Recommended Posts:-
| |