Creating Divisions and Spans in an HTML Document

The HTML editor provides you with an easy way to insert divisions and spans in your HTML document. Divisions are sections of the document that allow you to define a collection of elements to which you want to apply attributes. A span is like a division, but a division is always set off from the rest of the document as a separate paragraph, while a span can include subset of a paragraph. In both divisions and spans, the elements included must be sequential in the document.

You can use divisions and spans to apply these types of attributes to collections of elements:

Divisions appear in the HTML document as <DIV> and </DIV> tags. All the HTML elements between these two tags are considered part of the division. Spans appear between the <SPAN> and </SPAN> tags.

To create a division

  1. Switch to Design view.

  2. Select the portion of the HTML document that you want to include in the division. The division can include text as well as elements such as images and so on.

  3. From the HTML menu, choose Div.

  4. In the Insert Div dialog box, choose a positioning option:

Tip   To make it easier to work with absolutely positioned divisions in Design view, choose the Visible Borders button from the Design toolbar.

To create a span

  1. Switch to Design view.

  2. Select the portion of the HTML document that you want to include in the span. The span can include text as well as elements such as images and so on.

  3. From the HTML menu, choose Span.

Tip   To make it easier to work with spans in Design view, choose the Visible Borders button from the Design toolbar.

After you have defined a division or span, you can add elements to it.

To add elements to a division or span