Back to Developer Roadmap

img vs. figure

src/data/roadmaps/html/content/img-vs-figure@f5O_U9dt0b73ZhLrWWz2L.md

4.0854 B
Original Source

img vs. figure

The `` tag in HTML is used to embed a simple image directly into a webpage. It requires a src attribute to specify the image source. On the other hand, the <figure> element represents self-contained content, like an image, illustration, diagram, code snippet, etc., that is referenced as a single unit. It is typically used with the <figcaption> element to provide a caption for the figure.

Visit the following resources to learn more: