HTML4 HTML5
Used to embed external resources into a web page, such as PDF files, images, audio recordings, video, or other HTML documents[cite: 3]. It also allows defining fallback content that will be displayed if loading the resource fails or if it is unsupported[cite: 3].
Both opening and closing tags are mandatory[cite: 3].
Attributes:
data – URL address of the external file or resource[cite: 3].type – MIME type of the embedded resource (e.g., application/pdf, image/svg+xml)[cite: 3].width – width of the allocated area for the object (in pixels)[cite: 3].height – height of the allocated area for the object (in pixels)[cite: 3].class, id, and style are also used[cite: 3].Code:
The browser will interpret this code as follows: