The Web Design Group

SPAN - Generic Inline Container

Syntax <SPAN>...</SPAN>
Attribute Specifications
Contents Inline elements
Contained in Inline elements, block-level elements

The SPAN element is a generic inline container. SPAN carries no structural meaning itself, but it can be used to provide extra structure through its LANG, DIR, CLASS, and ID attributes. Style sheets are often used to suggest a presentation for a given class or ID.

SPAN should only be used where no other HTML inline element provides a suitable meaning. If a presentation such as bold or italic text would be suitable on visual browsers, authors may prefer to use an appropriate font style element. For example:

  1. <P><SPAN LANG=fr>La Révolution Tranquille</SPAN> shook Quebec in the early 1960's.
  2. <P><I LANG=fr>La Révolution Tranquille</I> shook Quebec in the early 1960's.

These examples are identical in meaning, but the second example uses the I element to suggest italic text.

DIV is a block-level equivalent of SPAN for containing block-level elements such as P and TABLE.

More Information