Students Empire

Learn Something New
Home

table caption



The caption element lets you define a caption and associate it with a table element.


The align attribute is obsolete.


			      <!DOCTYPE HTML>
			    <html>
			    <head>
			    </head>
			    <body>
			      <table>
			        <caption>Results of the Survey</caption>
			          <tbody>
			            <tr>
			              <th>Favorite:</th>
			              <td>500</td>
			            </tr>
			          </tbody>
			      </table>
			    </body>
			    </html>
			    

A table can contain only one caption element, but it doesn't have to be the first element contained in the table.