Main Index |
Top Of Tree |
Tag Index |
Tag History
- What is it?
- The SPAN tag is used in situations where the author wishes to apply
a style using Cascading Style Sheets to a content area (text, etc.) that does not
have a structured or established HTML rendering convention. It is an in-place
Character Formatting level tag that does
NOT have an implied linebreak before and after the enclosed
content. For more information on Style Sheets, please see the
Style Sheet Guide.
Style Sheet Attributes
[More on Cascading Style Sheets]
- Class
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This represents an assigned semantic classification grouping(s) for the
current tag.
- Values:
Given as a comma separated list of alphanumeric characters. Class names
may contain spaces (multiple consecutive spaces treated as a single
space.)
- ID
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This assigns an alpha-numeric identifier that is unique
to this tag instance. Style sheets may use this attribute to reference
the current instance of this tag. Hyperlinks may also use this identifier
to serve as a destination.
- Values:
An alphanumeric string - initial character must be a letter followed
by alphabetic characters, digits, "-" or "."
characters. The allowable set of alpha-characters is restricted to the
A-Z and a-z set.
- Style
- 2 | 3
| 3.2 | IE3B1
| M | N4B3
- Required? No
- Description:
This attribute is a text string that provides rendering style
information for the current tag.
- Values:
Please see the description of
inline styles for more
information on how to use this attribute and its
possible values.
- Example
- <span ALIGN="right" CLASS="greensection" STYLE="color: lime">text within a span tag</span>
- Parent Model
-
%Anchors% |
%Virtual
Formatting% |
%Physical
Formatting% |
%Block Format
Parent% |
%Multimedia
Parent% |
<Body> |
<Address> |
<Basefont> |
<Heading> |
<Marquee>
- Content Model
- %Text% |
%Anchors% |
%Virtual Formatting% |
%Physical Formatting% |
%Line Break Content% |
%Multimedia Content%
Tips & Tricks
- Note that the SPAN element was not listed in the
Character Formatting section, even
though it is a Character Level tag. This is because Span is a brand
new HTML element that is generic and does not serve any purpose without
Style information attached.
- Because SPAN is a generalized in-line HTML
Character Formatting element, it should
be used when you wish to define a general grouping of Styled text.
DIV (SPAN's Block Formatting equivalent)
should be used when you wish to create a generalized
Block Formatting element with an implied
linebreak before and after.
Browser Peculiarities
Boring Copyright Stuff...