Home>Article>Web Front-end> How to set table title in html
In HTML, you can use the caption tag to set the table title. The function of this tag is to define the title of the table. The syntax is "
Table title"; the caption tag needs to be placed in "” tags are aligned.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
In HTML, you can use the
tag to set the table title. The function of the tag is to define the title of the table. tag needs to be placed in the "You can only define one title per table.
Example:
姓名 | 年龄 |
---|---|
Peter | 20 |
Lois | 20 |
Usually this title will be centered above the table. However, the CSS properties "text-align" and "caption-side" can be used to set the alignment and display position of the title.
姓名 | 年龄 |
---|---|
Peter | 20 |
Lois | 20 |
Recommended tutorial: "html video tutorial"
The above is the detailed content of How to set table title in html. For more information, please follow other related articles on the PHP Chinese website!