<caption>

Description

<caption> marks a short description to be added to a table. It may only be placed immediately after an opening <table> tag.


<caption> . . . </caption>

Example


<html>
<body>
          <table>
               <caption>This is the caption for this table.</caption>
               <tr>
                    <td>Cell 1</td>
                    <td>Cell 2</td>
               </tr>
               <tr>
                    <td>Cell 3</td>
                    <td>Cell 4</td>
               </tr>
          </table>
</body><!--from w  ww  .  j  a  va2 s .  c om-->
</html>

Click to view the demo

The code above generates the following result.

caption




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference