Specifications
The object tag can be used for any external resource of valid MIME type, generally image, video, frame, or just misc. data to be handled by other plugins or scripts.
The contents between opening and closing tags are used as a fallback.
Rationale
While image, video, and iframe all have tags of their own, object tag allows these resources to be more flexible in maintenance and JavaScript interactions as well as allowing it to be invisible resource loaders for later use.
Key Attributes
- type: required. MIME type that determines how data should be treated by the web browser.
- data: required. URL or path to the resource you want to load.
Demonstration
<object type="image/png" data="resources/tags.png"></object>
will result in:
<object width="800px" height="400px" type="application/pdf" data="resources/Comp484_Project1_HTML_and_CSS.pdf"></object>
will result in: