The HTML Object Archive Attribute
Introduction
There is no HTML tag today for sound or video. There is one for image (the IMG tag), there are plenty for text (Paragraph tag, SPAN tag, etc.), but there is none for sound or video. There is however the HTML OBJECT element (OBJECT tag) which you can use for any media. Media means text, image, sound, animation and video.
You need basic knowledge in HTML and JavaScript to understand this article. Today, the principles of this article work with Opera 9 and may be other major browsers at their latest versions. I have not been able to test the code samples with the latest versions of the other major browsers.
Note: If you cannot see the code or if you think anything is missing in this article (broken link, image absent), just contact me at forchatrans@yahoo.com. That is, contact me for the slightest problem you have about what you are reading.
The Object Archive Attribute Proper
The HTML Object element has an attribute called the archive attribute. The value of this attribute is a space-separated list of URLs. As soon as the web page is loaded, each of these URLs downloads its resource (code, image, video, etc.). The resources arrive at the browser and just stay there until they are needed (by the browser script). These resources are officially there to be used by the Object element.
Data and type attributes of the Object Element
The Object element has an attribute called the data attribute. If the value of this attribute is the URL of an image, then you will see the image as the object at the browser.
The Object element also has an attribute called the type attribute. The same image can be created by different technologies, and so they are referred to as different types. A type of image supported by most browsers, is "image/jpeg".
Other Elements and the Object Archive Attribute
Even though the archive attribute was made to be used by the Object element, it can be used by other elements on the web page. In this article, we shall use the image for illustration.
There is no HTML tag today for sound or video. There is one for image (the IMG tag), there are plenty for text (Paragraph tag, SPAN tag, etc.), but there is none for sound or video. There is however the HTML OBJECT element (OBJECT tag) which you can use for any media. Media means text, image, sound, animation and video.
You need basic knowledge in HTML and JavaScript to understand this article. Today, the principles of this article work with Opera 9 and may be other major browsers at their latest versions. I have not been able to test the code samples with the latest versions of the other major browsers.
Note: If you cannot see the code or if you think anything is missing in this article (broken link, image absent), just contact me at forchatrans@yahoo.com. That is, contact me for the slightest problem you have about what you are reading.
The Object Archive Attribute Proper
The HTML Object element has an attribute called the archive attribute. The value of this attribute is a space-separated list of URLs. As soon as the web page is loaded, each of these URLs downloads its resource (code, image, video, etc.). The resources arrive at the browser and just stay there until they are needed (by the browser script). These resources are officially there to be used by the Object element.
Data and type attributes of the Object Element
The Object element has an attribute called the data attribute. If the value of this attribute is the URL of an image, then you will see the image as the object at the browser.
The Object element also has an attribute called the type attribute. The same image can be created by different technologies, and so they are referred to as different types. A type of image supported by most browsers, is "image/jpeg".
Other Elements and the Object Archive Attribute
Even though the archive attribute was made to be used by the Object element, it can be used by other elements on the web page. In this article, we shall use the image for illustration.
|
|



