how to use html 5 <caption> tag for images rather than tables

断了今生、忘了曾经 提交于 2019-12-07 14:47:52

问题


I'm redoing the html my team has been working on.. and i was wondering if I can modify html 5 tags. Specifically I would like to use the tag for images rather than tables..

in w3schools:

*Definition and Usage: The <caption> tag defines a table caption. The <caption> tag must be inserted immediately after the <table> tag. You can specify only one caption per table. Usually the caption will be centered above the table*.

How can I strip this tag from all these requirements?


回答1:


I think what you're after is the <figure> and <figcaption> tags, used to annotate images like you see in textbooks and the like. Caption is specifically for tables.



来源:https://stackoverflow.com/questions/6101991/how-to-use-html-5-caption-tag-for-images-rather-than-tables

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!