Home >Web Front-end >Front-end Q&A >How to use html caption tag

How to use html caption tag

藏色散人
藏色散人Original
2019-05-26 09:20:384384browse

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.

How to use html caption tag

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:

How to use html caption tag

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn