HTML <layer> (Positioned Layer) Tag
No standerd support
Example
<!-- 90s appropriate example to illustrate this element -->
<layer name="demo" bgcolor="#ffFFFF">
<layer name="demo1" left="100" top="100">
<img src="shaq.gif">
</layer>
<layer name="demo2" left="200" top="100" visibility="hidden">
<img src="demo.gif">
</layer>
</layer>
<!-- Linked layers -->
<layer src="demo.html" left="20" top="20" height="80%" width="80%">
</layer>
Meaning
The <layer> element allows the definition of overlapping content layers that can be exactly positioned, hidden or shown, rendered transparent or opaque, reordered front to back, and nested.
The functionality of layers is available using CSS position.
Notes:
- It is purely historical element
- It's defined by Netscape 4.x–specific
Standard Syntax
<layer>...
</layer>
Browser Support
Note: Only supported by Netscape 4, 4.5–4.8
Status
Attributes
Attribute | Description |
---|---|
above | Specifies the name of the layer to be rendered directly above the current layer. |
background | Specifies the URL of a background pattern for the layer. | below | Specifies the name of the layer to be rendered below the current layer. |
bgcolor | Specifies a layer’s background color. |
clip | clips a layer’s content to a specified rectangle. |
height | It is used to set the height of the layer, either in pixels or as a percentage of the screen or region the layer is contained within. |
left | Specifies, in pixels, the left offset of the layer. |
name | Specifies the layer a name that can be referenced by programs in a client-side scripting language. |
Specifies what should happen when the layer’s content exceeds its rendering box and clipping area. | |
pagex | Set the horizontal pixel position of the layer relative to the document window rather than any enclosing layer. |
pagey | Set the vertical pixel position of the layer relative to the document window rather than any enclosing layer. |
src | Specifies the URL that contains the content to be included in the layer. |
top | Specifies, in pixels, the top offset of the layer. |
visibility | Specifies whether a layer is hidden (hidden), shown (show), or inherits (inherits) its visibility from the layer enclosing it. |
width | Specifies a layer’s width, in pixels or as a percentage value of the enclosing layer or browser width. |
z-index | Specifies a layer’s stacking order relative to other layers. |
Global Attributes
<layer> element also supports the Global Attributes in HTML.
Event Attributes
<layer> element also supports the Event Attributes in HTML.