Yes, <object>
was designed for exactly this purpose. See W3C reference.
The trick is to nest the "plan B" object inside the main object.
<object id='a' classid='......'>
<object id='b' classid='......'></object>
</object>
Then it handles b
only when a
fails for whatever reason. Otherwise, only object a
is shown and the content of element a
is ignored.
And you can take the nesting deeper if you want, showing object c
if neither a
nor b
works, or finally showing the text if everything else fails.
<object id='a' classid='......'>
<object id='b' classid='......'>
<object id='c' classid='......'>
Sorry, nothing works!
</object>
</object>
</object>