<SPAN> | NN 4 IE 3 HTML 4
<SPAN>...</SPAN> | End Tag: Required
The SPAN element gives structure and context to any inline content in a document. Unlike some other structural elements that have very specific connotations attached to them (the P element, for instance), the author is free to give meaning to each particular SPAN element by virtue of the element's attribute settings and nested content. Each SPAN element becomes a generic container for all content within the required start and end tags. It is convenient to use the SPAN element as a wrapper for a small inline chunk of content that is to be governed by a style sheet rule. For example, if you want to differentiate a few words in a paragraph with the equivalent of a small caps look, you would wrap the affected words with a SPAN element whose style sheet defines the requested font and text styles. Such a style sheet could be defined as an inline STYLE attribute of the SPAN element or assigned via the CLASS or ID attribute depending on the structure of the rest of the document. If you need an arbitrary container for block-level content, use the DIV element. HTML 4.0 defines many more attributes for the SPAN element than are implemented in Version 4 browsers. The breadth of HTML attributes indicates the potential powers of this generic element to include links to related resources and many advisory attributes about those links. The same set of attributes apply to the DIV element in the HTML 4.0 specification.
Example
    <SPAN STYLE="font-size:10pt; text-transform:uppercase">
    30-day special offer</SPAN>
Object Model Reference
IE | [window.]document.all.elementID

CHARSET | NN n/a IE n/a HTML 4
CHARSET="characterSet" | Optional
Character encoding of the content at the other end of the link.
Example
    <SPAN CHARSET="csISO5427Cyrillic">CyrillicTextHere</SPAN>
Value Case-insensitive alias from the character set registry (ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets).
Default | Determined by browser.

DATAFLD | NN n/a IE 4 HTML n/a
DATAFLD="columnName" | Optional
Used with IE 4 data binding to associate a remote data source column name with the HTML content of a SPAN element. The data source column must be HTML (see DATAFORMATAS). DATASRC and DATAFORMATAS attributes must also be set for the SPAN element.
Example
    <SPAN  DATASRC="#DBSRC3" DATAFLD="quote" DATAFORMATAS="HTML"> ...</SPAN>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.all.elementID.dataFld

DATAFORMATAS | NN n/a IE 4 HTML n/a
DATAFORMATAS="dataType" | Optional
Used with IE 4 data binding, this attribute advises the browser whether the source material arriving from the data source is to be treated as plain text or as tagged HTML. A SPAN element should receive data only in HTML format.
Example
    <SPAN  DATASRC="#DBSRC3" DATAFLD="quote" DATAFORMATAS="HTML">...</SPAN>
Value HTML
Default | text
Object Model Reference
IE | [window.]document.all.elementID.dataFormatAs

DATASRC | NN n/a IE 4 HTML n/a
DATASRC="dataSourceName" | Optional
Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Content from the data source is specified via the DATAFLD attribute.
Example
    <SPAN  DATASRC="#DBSRC3" DATAFLD="quote" DATAFORMATAS="HTML">...</SPAN>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.all.elementID.dataSrc

HREF | NN n/a IE n/a HTML 4
HREF="URI" | Optional
According to the HTML 4.0 specification, the HREF attribute is meant to offer a URL to a resource that can supply "more information" about the SPAN element's content. No recommendation is provided as to whether this URL should be rendered in any way (like the HREF attribute of an A element). Perhaps a future browser could use this URL to generate a margin note or footnote in the form of a link. Several other attributes clearly intend for the HREF attribute's URL to be accessible in some way by the user.
Example
    <SPAN HREF="bibliogs/chap3.html"><A HREF="chap3.html">Chapter 3</A></SPAN>
Value Any valid URL, including complete and relative URLs, anchors on the same page (anchor names prefaced with the # symbol), and the javascript: pseudo-URL in scriptable browsers to trigger a script statement rather than navigate to a destination.
Default | None.

HREFLANG | NN n/a IE n/a HTML 4
HREFLANG="languageCode" | Optional
The language code of the content at the destination of a link. Requires that the HREF attribute also be set. This attribute is primarily an advisory attribute to help a browser prepare itself for a new language set if the browser is so enabled.
Example
    <SPAN HREFLANG="HI" HREF="bibliogs/hindi/chap3.html">
    <A HREF="...">Chapter 3 (Hindi)</A>
    </SPAN>
Value Case-insensitive language code.
Default | Browser default.

MEDIA | NN n/a IE n/a HTML 4
MEDIA="descriptorList" | Optional
Sets the intended output device for the content of the SPAN element. The MEDIA attribute looks forward to the day when browsers are able to tailor content to specific kinds of devices such as pocket computers, text-to-speech digitizers, or fuzzy television sets. The HTML 4.0 specification defines a number of constant values for anticipated devices, but the list is open-ended, allowing future browsers to tailor output to other media and devices.
Example
    <SPAN MEDIA="screen, tv, handheld">...</SPAN>
Value Case-sensitive constant values. Multiple values can be grouped together in a comma-delimited list within a quoted string. Values defined in HTML 4.0 are all | aura | braille | handheld | print | projection | screen | tty | tv .
Default | screen

REL | NN n/a IE n/a HTML 4
REL="linkTypes" | Optional
Defines the relationship between the current element and the destination of the link. Also known as a forward link, not to be confused in any way with the destination document whose address is defined by the HREF attribute. The HTML 4.0 recommendation defines several link types, and it is up to the browser to determine how to employ the value. The element must include an HREF attribute for the REL attribute to be applied.
Example
    <SPAN REL="next chapter" HREF="chapter3.html">...</SPAN>
Value Case-insensitive, space-delimited list of HTML 4.0 standard link types applicable to the element. Sanctioned link types are:
    alternate
    contents
    index
    start
    appendix
    copyright
    next
    stylesheet
    bookmark
    glossary
    prev
    subsection
    chapter
    help
    section
Default | None.

REV | NN n/a IE n/a HTML 4
REV="linkTypes" | Optional
A reverse link relationship. Like the REL attribute, the REV attribute's capabilities are defined by the browser, particularly with regard to how the browser interprets and renders the various link types available in the HTML 4.0 specification. Given two documents (A and B) containing links that point to each other, the REV value of B is designed to express the same relationship between the two documents as denoted by the REL attribute in A.
Example
    <SPAN REV="previous chapter" HREF="chapter2.html">...</SPAN>
Value Case-insensitive, space-delimited list of HTML 4.0 standard link types applicable to the element. See the REL attribute for sanctioned link types.
Default | None.

TARGET | NN n/a IE n/a HTML 4
TARGET="windowOrFrameName" | Optional
If the destination document associated with the HREF attribute is to be loaded into a window or frame other than the current window or frame, you can specify where the destination document should load by assigning a window or frame name to the TARGET attribute. Target frame names must be assigned to frames and windows as identifiers. Assign names to frames via the NAME attribute of the FRAME element; assign names to new windows via the second parameter of the window.open() scripting method. If you omit this attribute, the destination document replaces the document containing the link. This attribute is applicable only when a value is assigned to the HREF attribute of the element. If this feature is implemented in future browsers, the SPAN element will probably have only one destination document and one target (like the A element). If you want a link to change the content of multiple frames, you can use a SPAN element's onClick event handler or a javascript: pseudo-URL to fire a script that loads multiple documents. Set the location.href property of each frame to a desired URL.
Example
    <SPAN TARGET="display" HREF="chap3.html#sec2">...</SPAN>
Value Case-sensitive identifier when the frame or window name has been assigned via the target element's NAME attribute. Four reserved target names act as constants:
_blank | Browser creates a new window for the destination document.
_parent | Destination document replaces the current frame's framesetting document (if one exists; otherwise, it is treated as _self).
_self | Destination document replaces the current document in its window or frame.
_top | Destination document is to occupy the entire browser window, replacing any and all framesets that may be loaded (also treated as _self if there are no framesets defined in the window).
Default | _self

TYPE | NN n/a IE n/a HTML 4
TYPE="MIMEType" | Optional
An advisory about the content type of the destination document or resource. A browser might use this information to assist in preparing support for a resource requiring a multimedia player or plugin.
Example
    <SPAN TYPE="video/mpeg" HREF="ski4.mpeg">...</SPAN>
Value Case-insensitive MIME type. A catalog of registered MIME types is available from ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/.
Default | None.