Home > Back-end >  What's the difference between the <figure> tag and the <img> tag?
What's the difference between the <figure> tag and the <img> tag?

Time:12-06

What is the difference between the <figure> tag and the <img> tag?

CodePudding user response:

The figure tag in HTML5 is used to add self-contained content like illustrations, diagrams, photos, or codes listing in a document. HTML img tag is used to add image or to set the background in the webpage/website. please check this out: https://www.geeksforgeeks.org/difference-between-figure-img-tags-in-html/

CodePudding user response:

The difference is simple if you want to add an image in document you have to use < img > tag. The < figure > tag is used to display the image with self-explanatory about the image in the document.

Usually we saw like figure 6.1 1.3 in our text books. That is where figure tag should be used.

W3 Schools about figure tag.

  •  Tags:  
  • html
  • Related