Which of the HTML samples defines a title of the table?
Explanation
The <caption> tag defines a table caption.
The <caption> tag must be inserted immediately after the <table> tag.

There is can be only one caption per table.
Tip: By default, a table caption will be center-aligned above a table. However, the CSS properties text-align and caption-side can be used to align and place the caption.

The code:


<table border='1' width=50%>
 <caption>Monthly income</caption>
 <tr> <th>Month</th> <th>Income</th> </tr>
 <tr> <td>January</td> <td>$1000</td> </tr>
</table>


Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
HTML & CSS quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes