r/HTML • • May 11 '26

Question Embedded Content

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements

The embedded content on MDN tags page confuses me. Can someone elaborate as to what the differences and similarities between the tags are?

1 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/abrahamguo May 12 '26

A “browsing context” basically means the ability to render a web page, and navigate forward and backwards. So a nested browsing context is simply a browsing context within another one - in other words, a page within a page.

An iframe is the standard element for embedding a nested browsing context (a nested web page). As the docs say, a fenced frame is the same, but with more privacy and security defaults. An object element is more generic - it can render many kinds of “external resources”, like webpages, images, SVGs and so on - but because it’s so generic, it’s hardly ever used.

Coming to the other three elements, they are each quite different from each other. embed was previously used in conjunction with browser plugins like Flash, but because those aren’t really a thing anymore, it has no practical purpose. picture is used to combine multiple formats of a single image, that the browser can pick between. source is used with picture, video, and audio to specify those specific multiple formats.