Layer Element
   HOME

TheInfoList



OR:

Layers were the core of a method of
dynamic HTML Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts (JavaScript, VBScript, or any other supported scripts) that enabled the creation of interactive ...
programming specific to
Netscape 4 Netscape Communicator (or ''Netscape 4'') is a discontinued Internet suite produced by Netscape Communications Corporation, and was the fourth major release in the Netscape line of browsers. It was first in beta in 1996 and was released in June ...
. Each layer was treated as a separate document object in
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
. The content could be included in the same file within the
non-standard Standardization or standardisation is the process of implementing and developing technical standards based on the consensus of different parties that include firms, users, interest groups, standards organizations and governments. Standardization ...
layer element (or any other element with the positioning set to "absolute" via
CSS Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone techno ...
) or loaded from a separate file with <layer src="URL"> or <
div Div or DIV may refer to: Science and technology * Division (mathematics), the mathematical operation that is the inverse of multiplication * Span and div, HTML tags that implement generic elements * div, a C mathematical function * Divergence, ...
src="URL">
. It could also be generated via JavaScript with the layer = new Layer() constructor. The content would then be inserted into the layer with layer.document.write(). But in modern browsers, the functionality of layers is provided by using an absolutely-positioned div, or, for loading the content from an external file, an IFrame. At the height of the
Browser Wars A browser war is competition for dominance in the usage share of web browsers. The "first browser war," (1995-2001) pitted Microsoft's Internet Explorer against Netscape's Navigator. Browser wars continued with the decline of Internet Explorer ...
, Netscape 4 and
Internet Explorer Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated IE or MSIE) is a series of graphical user interface, graphical web browsers developed by Microsoft which was used in the Microsoft Wind ...
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) else


References

* Netscape: Dynamic HTML in Netscape Communicator
On the Internet Archive
HTML tags Web 1.0 {{web-stub