The <object>
element is widely supported by browsers and is used to embed objects like Java applets, PDF readers, Flash players, or even HTML content within a webpage.
<object width=”100%” height=”500px” data=”snippet.html”></object> |
Or, if preferred, it can also be used for embedding images.
<object data=”audi.jpeg”></object> |
The <embed>
element is supported by all major browsers and defines an embedded object within an HTML document. Although browsers have supported it for a long time, it was officially included in the HTML specification with HTML5.
<embed src=”audi.jpeg”> |
Note that the <embed> element does not require a closing tag and cannot contain alternative text. |
The <embed> element can also be utilized to embed HTML content within HTML documents.
<embed width=”100%” height=”500px” src=”snippet.html”> |