encyclopegia.org

Layer element

Layers were the core of a method of dynamic HTML programming specific to Netscape 4. Each layer was treated as a separate document object in JavaScript. The content could be included in the same file within the non-standard element (or any other element with the positioning set to "absolute" via CSS) or loaded from a separate file with or . It could also be generated via JavaScript with the constructor. The content would then be inserted into the layer with . But in modern browsers, the functionality of layers is provided by using an absolutely-positioned , or, for loading the content from an external file, an . At the height of the Browser Wars, Netscape 4 and Internet Explorer had significantly different JavaScript implementations. Thus, layers could be used for browser detection. A JavaScript program would very often need to run different blocks of code, depending on the browser. To decide which blocks of code to run, a JavaScript program could test for support for layers, regardless of whether the program involved layers at all. Namely, if (document.layers) { // ...code that would be executed only by Netscape browsers... } else { // ...code that would be executed only by Internet Explorer... }

Layers were the core of a method of dynamic HTML programming specific to Netscape 4. Each layer was treated as a separate document object in JavaScript. The content could be included in the same file within the non-standard element (or any other element with the positioning set to "absolute" via CSS) or loaded from a separate file with or . It could also be generated via JavaScript with the constructor. The content would then be inserted into the layer with . But in modern browsers, the functionality of layers is provided by using an absolutely-positioned , or, for loading the content from an external file, an . At the height of the Browser Wars, Netscape 4 and Internet Explorer had significantly different JavaScript implementations. Thus, layers could be used for browser detection. A JavaScript program would very often need to run different blocks of code, depending on the browser. To decide which blocks of code to run, a JavaScript program could test for support for layers, regardless of whether the program involved layers at all. Namely, if (document.layers) { // ...code that would be executed only by Netscape browsers... } else { // ...code that would be executed only by Internet Explorer... } ==References== Netscape: Dynamic HTML in Netscape Communicator (On the Internet Archive)

References

No reference rows published for this article.

Cite this article

MLA

"Layer element." encyclopegia.org, 2026, https://encyclopegia.org/wiki/layer-element. Accessed 24 November 2026.

Chicago

"Layer element." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/layer-element.

APA

encyclopegia.org. (2026). Layer element. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/layer-element

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Suwayda District

enwiki · references available

Röderland

enwiki · references available

Rückersdorf, Brandenburg

enwiki · references available

Sallgast

enwiki · references available

Schilda

enwiki · references available

Norwich Bus Station

enwiki · references available

Shiwa 2000

enwiki · references available

Jessie Penn-Lewis

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1348824326 · 0.5 · snapshot enwiki-001348824326

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.