How to create table format in HTML ?

 Posted by Prudhvisagar on 12/12/2014 | Category: HTML 5 Interview questions | Views: 460 | Points: 40
Answer:

To create a table format in html follow the below the code.In this we have mentioned <td>,<tr>,<th> and a table tag(<table>).These are the following things to create a table format in html.
For example:
<
table border="1" style="background-color:aqua;"   >

<tr>
<th>Student Name</th>
<th>Roll no</th>
<th>Percentage of the year</th>
</tr>
<tr>
<td>Ajay</td>
<td>0501</td>
<td>78%</td>
</tr>
<tr>
<td>Vivek</td>
<td>1242</td>
<td>82%</td>
</tr>
<tr>
<td>Anand</td>
<td>0524</td>
<td>65%</td>
</tr>
<tr>
<td>Anusha</td>
<td>0431</td>
<td>69%</td>
</tr>
<tr>
<td>Preethi</td>
<td>0432</td>
<td>73%</td>


</tr>


</table>


Asked In: While Learning | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Prudhvisagar