MF Web Services logo

HTML Help & Resources

Generic Inline Containers

The SPAN element, when combined with the effects of style, have powerful design capabilities. In fact, SPAN has supplanted the need for the, now depreciated, FONT,B,I,U,and STRIKE tags.

SPAN containers can be effectively nested inside other elements, or themselves, while not affecting the block-level structure of other elements.

The elements of style, and how to use them, are not covered in this reference. For more information on how to utilize the power of cascadding style, visit our CSS reference instead.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
  <HEAD>
    <TITLE>Document Title</TITLE>
    ... META DATA ...
  </HEAD>
  <BODY>
  <!-- Proper use of a SPAN container -->
  <P CLASS="normal">This is a <SPAN>paragraph</SPAN> of text.</P></DIV>
  <!-- Improper use of a SPAN container -->
  <SPAN>This is a <H2>paragraph</H2> of text.</SPAN>
  </BODY>
</HTML>

SPAN containers are inline elements, and cannot contain block-level items. Use SPAN containers to implement style formats inside of block-level or other inline elements.

Move on to the Next Topic - Images.