Home>Article>Web Front-end> How to use caption tag

How to use caption tag

不言
不言 Original
2019-02-11 16:50:29 5328browse

Thecaption tag is used to add a title to an HTML table. The caption must appear immediately after the table in the HTML document. It can be positioned intuitively at the bottom of the table using CSS. Let’s take a look. Specific usage of caption tag.

How to use caption tag

The caption element defines the table title, but only one title can be defined for each table. Usually this title will be centered above the table. (Reference address:HTML table)

Let’s look at a specific example

The code is as follows

     
最喜欢的颜色
名字 喜欢的颜色
Tom 蓝色
Jerry 红色
Marry 粉色
Cindy 黄色

The effect is as follows: The title is in the middle of the table.

How to use caption tag

This article ends here. For more exciting content about the front-end, you can pay attention to the relevant column tutorials on the PHP Chinese website! ! !

The above is the detailed content of How to use 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
Previous article:How to use oncopy event Next article:How to use oncopy event