How to use html caption tag

藏色散人
Release: 2019-05-26 09:20:38
Original
4356 people have browsed it

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template