<SPAN>
The SPAN element is an inline grouping element similar to the DIV element
(except the DIV is used to create a block-level grouping.) By inline, we
mean that the SPAN element doesn't create a line break before and after
the grouping. With a SPAN element, you can apply styles and create a named
grouping of HTML statements for referencing in javascript.
An end tag is required for this element.
Attributes
Attribute |
Description |
ID |
Identifies this tag to reference in script (program code) |
CLASS |
Define the class used to render this element (defined by a style sheet) |
TITLE |
A title that is associated with the element (displayed as a tooltip in Internet Explorer) |
STYLE |
Defines an inline style for this element. SPAN elements are often used to apply
special formatting to HTML content. |
ALIGN |
Defines an alignment for the HTML content contained with the SPAN element.
This may be one of the following: "left", "right" or "center" |
|
Example
<SPAN STYLE="font-weight: bold; color: #ff0000">
Warning! Red text shouldn't be ignored!
</SPAN>
Renders As:
Warning! Red text shouldn't be ignored!
Compatibility
HTML 4.01
|