Home >Web Front-end >Front-end Q&A >How to use html caption tag
html The caption tag is used to define the table title. The caption tag must follow the table tag. You can only define one title for each table. Usually this title will be centered above the table.
What is the label for caption? How to use html caption tag?
Function: Define the table title.
Note:
The caption label must follow the table label. You can define only one title per table. Usually the title will be centered above the table.
Note:
In HTML 4.01, the align attribute of the caption element is deprecated. In XHTML 1.0 Strict DTD, the align attribute of the caption element is not supported.
html caption tag usage example
<html> <body> <h4>这个表格有一个标题,以及粗边框:</h4> <table border="6"> <caption>我的标题</caption> <tr> <td>100</td> <td>200</td> <td>300</td> </tr> <tr> <td>400</td> <td>500</td> <td>600</td> </tr> </table> </body>
Effect:
The above is the detailed content of How to use html caption tag. For more information, please follow other related articles on the PHP Chinese website!