Home >> HTML 5 >> caption Tag in HTML 5

caption Tag in HTML 5

The <caption> tag defines a table caption.
 
Example
<!Doctype Html>  
<html>     
<head>      
       <title>Caption Tag</title>
</head>  
<body>   
<table width="200" height="200" border="1">
   <caption>User Details</caption>
    <tr>
        <th>Name</th>
        <th>Age</th>
    </tr>
    <tr>
        <td>Ram</td>
        <td>22</td>
    </tr> 
    <tr>
        <td>Shyam</td>
        <td>24</td>
    </tr>
</table>
</body>  
</html>  
Output
                User Details
Name Age
ram 22
shyam 24

Post Your Comment

Next Questions
center Tag
cite Tag
code Tag
col Tag
colgroup Tag
data Tag
datalist Tag
dd Tag
del Tag
details Tag
dfn Tag
dialog Tag
dir Tag
div Tag
dl Tag
dt Tag
em Tag
embed Tag
fieldset Tag
figcaption Tag
figure Tag
font Tag
footer Tag
form Tag
frame Tag

Copyright ©2022 coderraj.com. All Rights Reserved.