How can you provide heading to a table?

 Posted by Pgayath on 9/21/2012 | Category: HTML 5 Interview questions | Views: 2818 | Points: 40
Answer:

The <caption> tag inside the <table. tag is used to provide caption to the table.

Example:
<html>

<body>

<table border="1">
<caption>Monthly Savings</caption>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>August</td>
<td>1000</td>
</tr>
<tr>
<td>September</td>
<td>500</td>
</tr>
</table>

</body>
</html>


| Alert Moderator 

Comments or Responses

Login to post response