HTML archive Attribute
The obsolete HTML archive attribute was historically used with embedded content to specify one or more archive files containing resources required by an applet or object.
archive attribute is obsolete and should not be used in modern HTML. There is no direct modern replacement for this historical resource-loading mechanism.
Historical Syntax
The archive attribute contained one or more URLs identifying archive files associated with the embedded content:
<object data="example.class" archive="example.jar">
Embedded content
</object>
Archive files could package multiple resources together so they could be retrieved for use by the embedded program.
Historical Elements
The archive attribute was historically associated with elements used to embed external programs and resources.
| Element | Historical Purpose |
|---|---|
<applet> |
Specified archive files containing classes and other resources required by a Java applet. |
<object> |
Specified archive files containing resources associated with an embedded object. |
Historical Use
The archive attribute was commonly associated with Java applets and other plugin-based embedded content. Instead of retrieving every required resource separately, related files could be packaged into an archive and referenced from the HTML document.
For Java applets, these resources were commonly stored in JAR files. The browser and its supporting Java environment could retrieve the archive and use its contents when running the applet.
Why It Became Obsolete
The archive attribute was tied to older methods of embedding programs and plugin-based content in webpages. Technologies such as Java applets disappeared from normal browser use, and modern web applications use standardized HTML, CSS, JavaScript, media, and browser APIs instead.
Because modern browsers no longer use this historical archive-loading mechanism for webpage content, the archive attribute has no role in modern HTML.
Modern Alternative
There is no direct modern replacement for the archive attribute. The appropriate approach depends on what the original embedded program or object was designed to provide.
Modern webpages typically use standard web technologies instead of downloadable plugin archives. HTML provides the document structure, CSS controls presentation, JavaScript can provide interactive behavior, and specialized HTML elements can embed supported media and other resources.
When maintaining an older webpage that contains the archive attribute, first determine what the original applet or object did. The old embedded feature can then be replaced with an appropriate modern web technology rather than attempting to reproduce the obsolete archive mechanism.
Legacy Browser Support
The archive attribute was implemented in older browser environments that supported Java applets and other plugin-based embedded content. Its usefulness depended on the browser and the external technology required to process the referenced archive.
Modern browsers no longer provide the historical plugin environment that made many uses of the archive attribute functional. The attribute should not be used when creating or updating modern webpages.
For additional information about historical browser compatibility, visit Can I Use? . Search for the HTML element or attribute you want to check. Search results can include related HTML features, element attributes, APIs, and other technologies, so select the result that most closely matches the legacy feature you are researching.
Related Attributes
Other obsolete attributes historically associated with applets, objects, and embedded content include:
classid- Historically used to identify an implementation for an embedded object.code- Historically used to identify the code used by an applet.codebase- Historically used to specify a base URL for applet or object resources.codetype- Historically used to specify the media type of code associated with an object.declare- Historically used to declare an object without immediately instantiating it.standby- Historically used to provide a message while an object was loading.
Specifications
The archive attribute on the <object> element is listed among obsolete and non-conforming features in the WHATWG HTML Living Standard .
