HTML Tags used to create Tables

                                        HTML Tags used to create Tables
Now here we describe those tags which are used to create tables in HTML.
1. <Table>    :- <table> tag is used to show it is table and here we describe table         border, table width etc.

2. <tr>     :- <tr> tag is used to show table row.

3. <td>     :- <td> tag defines table data.

4. <th>     :- <th> tag defines table heading.

5. <caption> :- <caption> tag shows and defines our table caption.

Lets' Example and enjoy the output:-

<html>
 <head>
 <title>Web Tips Top</title>
 </head>
 <body>
   <table border="1" width="50%">
     <caption> HTML Table Tutorial </caption>
      <tr>
        <th>Roll No.</th>
        <th>Name</th>
        <th>Class</th>
     </tr>
     <tr>
        <td>1234</td>
        <td>Akshay</td>
        <td>1st</td>
     </tr>
     <tr>
        <td>1235</td>
        <td>Gautam</td>
        <td>2nd</td>
     </tr>
     <tr>
        <th>1236</th>
        <th>Rajesh</th>
        <th>3rd</th>
     </tr>
   </table>
 </body>
</html>

Comments

Popular Posts