HTML Table tag | Create table in HTML

Techno HTML5

The table in HTML is used to contains data and data alignment. In simple table rows and columns are available also in HTML table contains the rows and columns. The table example will clear you about creating a table in HTML using table attributes.
To create we use the <tablet> tag.
Some important tags that used in Table -

<tr>- <tr> tag indicate the table row .

<th>- <th> Tag used for table heading .

<td>- It refers to table data also used to create columns in a table .

<height>- To give the table height .

<width>- It used to give the table width .

Let's learn with an example.


HTML Tabel


<!DOCTYPE>
<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>
</head>
</html>
Run

How to - HTML Table -Steps
1. First of all use the table tag - <table>
3.Write table heading <th> and close the table hading and also table row ,</th>,</tr>.
4. If you want to create column then use the tag- <td>and closing tag -</td>
Attributes - height and width. 5. End at the last close the table tag- </table>