Using layers

In HTML, a layer is a container for other elements, such as paragraphs, images, tables, and so forth. Layers have two noteworthy properties:

  • The position of a layer is explicitly specified.
  • Layers can overlap each other and other elements.

You can think of a layer as a movable box that you put content into and that you can place anywhere on a page. Layers are a powerful, yet intuitive way to create complex page layouts, since you can put anything in a layer and simply drag the layer wherever you want.

Namo Web Editor 3.layer Using layers

An example of a layer overlapping other content

In this section

Creating and positioning a layer

Resizing a layer

Adding content to a layer

Deleting a layer

Setting a layer’s Z-order

Setting a layer’s initial visibility

Changing a layer’s ID

Setting a background color or image on a layer

Setting borders, margins, and padding for a layer

Using the Layers window

Deciding which tag to use for layers

Related topics

Using floating boxes

Adding JavaScript effects

Creating timelines

Using layers