According to MDN
The HTML element <object>
represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be manipulated by a plug-in.
The HTML Element <embed>
represents an integration point for an external application or interactive content (in other words, a plug-in).
The most noticeable difference is that <embed>
is a Empty element, that is, it cannot contain any element within it. Already the <object>
allows, can be a fallback, which is something that will be shown if there is no support for that external resource, for example, an SVG:
<object data="your.svg" type="image/svg+xml">
<img src="yourfallback.jpg" />
</object>
The elements <object>
also allows passing parameters to the external resource:
<object data="movie.swf" type="application/x-shockwave-flash">
<param name="foo" value="bar">
</object>
The attributes allowed in<embed>
sane:
The attributes allowed in<object>
sane:
width
height
date
type
form
name
usemap
There are others but they are obsolete in HTML5
The question is a good one, but I’m afraid I won’t get good answers. I’ve searched the internet and there are only bad answers. It would take someone with authority to answer this, it can’t just be opinion.
– Maniero