How to use html 5 <caption> tag for images, not tables

I am redoing the html my team is working on .. and I was wondering if I could change the html 5 tags. In particular, I would like to use the tag for images, not 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 remove this tag from all of these requirements?

+3
source share
1 answer

I think you need <figure>and<figcaption> tags used to annotate images like the ones you see in textbooks, etc. The signature is for tables.

+8
source

All Articles