Click to return to the DHTML, HTML     
SMALL Element | SMALL Obj...     STRIKE Element | STRIKE O...     DHTML Objects    
Web Workshop  |  DHTML, HTML & CSS

SPAN Element | SPAN Object


Specifies an inline text container.

HTML Syntax

<SPAN
   CLASS=classname
    DATAFLD=colname
    DATAFORMATAS=HTML | TEXT
    DATASRC=#ID
    ID=value
    LANG=language
    LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT  | VBS 
    STYLE=css1-properties
    TITLE=text
    event = script
>

Remarks

This element is especially useful for applying cascading style sheets (CSS) styles.

The SPAN element is an inline element and requires a closing tag.

This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script as of Internet Explorer 4.0.

Members

Styles

Example

This example uses the SPAN element to create an inline text container that changes the color of a word to blue.

<P>This paragraph contains a single <SPAN STYLE="color: blue">blue</SPAN> word.


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.