Previous | Home | Next |
HTML Table tag is make a table in the form of row and column. It is arranged layout of page like header, body, and footer section etc.
Syntax used
<table>...</table>
Some important html table tags
Tags | Description |
<tr> | It defines a row in a table. |
<td> | It define a cell in table |
<table> | to show a table. |
<caption> | It define the table caption. |
<colgroup> | It is perfer for one or more columns in a table for formatting. |
<thead> | It is used to header in the table. |
<tfooter> | It is used to footer in a table. |
Example
<table> <tr><th>Name</th><th>Marks</th></tr> <tr><td>Sanjeev</td><td>65</td></tr> <tr><td>Parmod</td><td>80</td></tr> <tr><td>Shina</td><td>82</td></tr> <tr><td>Raja</td><td>72</td></tr> </table>
Output :
There are two type of boder making in html table like as
- Boder attribute
- By CSS
Example
<table border="1"> <tr><th>First_Name_of_company </th><th>Last_Name_of_Company </th><th>Company_Rank</th></tr> <tr><td>DR.Rajesh</td><td>kumar</td><td>5th</td></tr> <tr><td>Ajay</td><td>William</td><td>8th</td></tr> <tr><td>Swati</td><td>Sironi</td><td>7th</td></tr> <tr><td>Manoj</td><td>Singh</td><td>3th</td></tr> </table>
Output :
Previous | Home | Next |