Home >Web Front-end >HTML Tutorial >Detailed explanation of the usage of figcaption tag in HTML5

Detailed explanation of the usage of figcaption tag in HTML5

巴扎黑
巴扎黑Original
2017-06-27 09:40:125124browse

The figure and figcaption tags in HTML5 are generally used together. First understand the basic definitions of the two, and then illustrate their usage with examples.

The tag specifies independent stream content (images, charts, photos, code, etc.).

The content of the figure element should be related to the main content, but if deleted it should have no impact on document flow. It is a combination of elements, optionally with a title. The figure tag is used to represent an independent piece of content on a web page. Removing it from the web page will not affect other content on the web page.

figure has a sub-tag: figcaption.

tag defines the caption of the figure element.
The "figcaption" element should be placed as the first or last child element of the "figure" element.

OK, we have finished introducing the figure and figcaption tags. Next, we will use several examples to apply them. As follows:

Case 1:

Figure element without title:

PHP Chinese website

Case 2:

Figure element with title:

Web front-end home
Web front-end home, focusing on Web front-end, HTML5, CSS3, JavaScript, JQuery, mobile Development, page performance optimization and other development front-end technology communication platform

Case 3:

MultiplePicture, figure element with the same title:

Web Front-end Home 1 Web front-end home 2 Web front-end home 3
Web front-end home, focusing on the Web Front-end, a communication platform for developing front-end technologies such as HTML5, CSS3, JavaScript, JQuery, mobile development, page performance optimization, etc.

The above is the detailed content of Detailed explanation of the usage of figcaption tag in HTML5. 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