Home >Web Front-end >Front-end Q&A >Is figure a new tag in html5?
figure is a new tag. Figure is a new semantic tag in HTML5, which is used to specify independent flow content, such as images, charts, photos, etc.; the content in figure is usually related to the main content, and the position of the element is independent from the main content. Yes, if you delete it, it will not affect other content in the web page.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
The content in the figure is usually related to the main content, and the position of the elements is independent from the main content. If it is deleted, it should not affect the document flow; that is, if the figure is deleted, it will not affect other content in the web page.
Note:
The
The
Insert a
Benefits of using figure and figcaption tags
When search engines search for figure, they will know that pictures, charts, photos, codes and other media are stored here. I don’t think that what is stored here is articles or other things. Search engines make searching faster and more convenient.
On the other hand, when programmers see this label, they will know that what exists here are pictures and other media for easy reading.
Example:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>figure和 figcaption元素的使用</title> </head> <body> <p>被称作“第四代体育馆”的“鸟巢”国家体育场是 2008年北京奥运会的标志性建筑,它位于北京北四环边,包含在奥林匹克国家森林公园之中。占地面积 20.4万平方米,总建筑面积 25.8万平方米,拥有 9.1万个固定座位,内设餐厅、运动员休息室、更衣室等。2008年奥运会期间,承担开幕式、闭幕式、田径比赛、男子足球决赛等赛事活动。</p> <figure> <figcaption>北京鸟巢</figcaption> <p>拍摄者:XXXX,拍摄时间:2020 年 09 月</p> <img src="Is figure a new tag in html5?" alt=""> </figure> </body> </html>
(Learning video sharing: html video tutorial 、web front end)
The above is the detailed content of Is figure a new tag in html5?. For more information, please follow other related articles on the PHP Chinese website!