In an <object> tag, you can put alternate content, like this:
<object data="image.svg" type="image/svg+xml">
<img alt="Image" src="image.png"/>
</object>
Is there a way to do the same (or something similar) with <embed> tag?
I suppose Javascript could be a solution, but I’m looking for something with only HTML.
I’m sorry to say that embedding arbitrary data types is not yet possible. When loaded by a browser most unrecognized mime types get interpreted as plain HTML.
It’s pretty hard to get even basic media types to embed — see audio and video, which are just starting to gain popular acceptance with HTML5. Most object tags you see are likely restricted to media types that are possible to load via proprietary desktop/browser extensions.