Search code examples
htmldata-urihtml-object

How to use <object data= with the syntax <object>?


I can only use:

<object> data.. </object>, 

not:

Can I change the syntax:

<object data="data:text/html;base64,drgsdrgsdrgsdrgsdrgsdrgsdrg=="></object>

into this style:

<object>data</object> style?

Solution

  • No.

    The child nodes of an object element:

    1. Provide alternative content in case the object data can't be loaded
    2. Are expressed in the form of HTML not a URI

    The closest you could get would be to decode the HTML embedded in the URI (despite the claim it is text/html, the URI doesn't appear to resolve to anything sane) and then use that instead of having an object at all.