![]()
<S>
<SAMP>
<SCRIPT
...>
<SELECT>
<SMALL>
<SOUND
...>
<STRIKE>
<STRONG>
<SPACER>
<SPAN>
<STYLE>
<SUB>
<SUP>
This tag is equivalent of <STRIKE>. Refer to <STRIKE>.
The <SAMP> tag indicates a sequence of literal characters; typically rendered as monospaced.
A script is embedded in HTML within a <SCRIPT> tag.
<SCRIPT>...</SCRIPT>
The text of a script is inserted between <SCRIPT> and its
end element.
Attributes within the <SCRIPT> element can be specified as
follows:
<SCRIPT LANGUAGE="JavaScript | VBscript">
</SCRIPT>
The LANGUAGE attribute is mandatory unless the
SRC attribute is present and specifies the scripting language.
Use of the LANGUAGE attribute is important now that Internet
Explorer supports JavaScript. In order for the Internet Explorer
to know it is to process the script as JavaScript, it needs to
know that it is JavaScript.
The SRC attribute is optional and, if given,
specifies a URL that loads the text of a script.
<SCRIPT LANGUAGE="language" SRC=url> Both
attributes may be present.
For Netscape to be able to properly use external JavaScript
files, the server on which the files are to reside must have the
MIME type application/x-javascript mapped into its list of MIME
types (with a suitable extension mapped to it - Netscape
recommend ".js") for Netscape to properly respond to
the script when it is loaded. Scripts should be placed inside
comment fields to ensure that the script is not displayed when
the page's HTML is viewed with a browser unaware of the
<SCRIPT> element. The entire script is encased by HTML
comment elements:
<!-- Begin to hide script contents from old browsers.
<!-- End the hiding here.-->
The Select element allows the user to choose one of a set of
alternatives described by textual labels. Every alternative is
represented by the Option element.
Attributes are:
ERROR
Proposed.
MULTIPLE
The MULTIPLE attribute is needed when users are allowed to make
several selections, e.g. <SELECT MULTIPLE>.
NAME
Specifies the name that will be submitted as a name/value pair.
SIZE
Specifies the number of visible items. If this is greater than
one, then the resulting form control will be a list.
The SELECT element is typically rendered as a pull down or pop-up
list. For example:
<SELECT NAME="Channels">
<OPTION>CNN
<OPTION>Discovery
<OPTION>ABC
<OPTION>CBS
</SELECT>
If no option is initially marked as selected, then the first item
listed is selected.
The <SMALL> element specifies that the enclosed text
should be displayed, if practical, using a small font (compared
with the current font).
This is normal text, with <SMALL>this bit</SMALL>
being small text.
would be displayed as:
This is normal text, with this bit being
small text.
Use of this element is currently supported by Netscape and the
Internet Explorer only. They also allow the <SMALL> ...
</SMALL> element to be used surrounding the <SUB>
... </SUB> and <SUP> ...
</SUP> elements to force rendering of the sub/superscript
text as text even smaller than the default slightly smaller
(compared to the normal) text normally used. The exact appearance
of the small text will change depending on any <FONT
SIZE=...> and <BASEFONT SIZE=...> settings, if
specified.
<SMALL> can also take the CLASS, ID and STYLE attributes to
allow style sheet definitions to be applied to it. For more
details of these attributes, refer to the Style
Sheets topic.
NCSA Mosaic supports use of the SOUND element for playing
in-line sound. This element allows the playing of *.WAV files in
pages. NOTE : The SOUND element is only supported by Mosaic
The syntax is:
<SOUND SRC="filename.wav">
This element is not currently supported by the HTML working
group, although the Mosaic authors believe it will be included.
The <STRIKE> ... </STRIKE> element
states that the enclosed text should be displayed with a
horizontal line striking through the text. Alternative mappings
are allowed if this is not practical.
The actual element detailed in HTML specifications, is <S>
... </S>, which is also supported by the three browsers.
This text would be <STRIKE>struck through</STRIKE>
would be displayed as : This text would be struck through
<STRIKE> can also take the CLASS, ID and STYLE attributes
to allow style sheet definitions to be applied to it. For more
details of these attributes, refer to the Style Sheets
topic.
The Strong element indicates strong typographic emphasis,
typically rendered in bold.
The text following STRONG <STRONG>will not be weak!</STRONG>
would be displayed as :
The text following STRONG will not be weak!
<STRONG> can also take the CLASS, ID and STYLE attributes
to allow style sheet definitions to be applied to it. For more
details of these attributes, refer to the Style Sheets topic.
This Netscape specific tag can be used to include hard coded
white space in a document. It accepts the following attributes :
TYPE
The TYPE of <SPACER> can be either horizontal, vertical or
block. A horizontal <SPACER> inserts horizontal white space
in between words. A vertical <SPACER> inserts vertical
space between lines and the block <SPACER> behaves like an
image (except does not display an image.) It essentially,
reserves a block of space within the document.
SIZE
When a <SPACER TYPE="horizontal"> or <SPACER
TYPE="vertical"> is used, the SIZE attributes
specifies its size in pixels. Any setting of this attribute is
ignored if a <SPACER TYPE="block"> is used.
WIDTH
When a <SPACER TYPE="block"> is used, the WIDTH
attributes specifies the WIDTH of the block to be reserved as
white space.
HEIGHT
When a <SPACER TYPE="block"> is used, the HEIGHT
attributes specifies the HEIGHT of the block to be reserved as
white space.
ALIGN
When a <SPACER="block"> is used, the ALIGN
attributes specifies the alignment of the white space block and
can accept any alignments as used by the <IMG> tag for
embedding images.
The SPAN element is used to apply a style to text which doesnt
play any structural role, or where use of standard HTML elements
is not desirable. For example, it may be useful for text to be
highlighted by rendering it with a different background colour.
For text such as this, using a standard HTML element such as <EM> with an applied
style, would possibly be inappropriate, because browsers that dont
support style sheets would render the text as italicised. The
<SPAN> element is recommended in such situations as other
browsers simply ignore it. The SPAN element can be used within
text blocks to apply a style as defined in a style sheet,
according to a CLASS or ID attribute, or the STYLE can be
specified within the <SPAN> attribute. As with other
elements used within the of a HTML document, SPAN can also have a
certain style applied to it in the style sheet definition.
Example : If .redtext : { color : #FF0000} has
been defined in a style sheet, then the following :
some text<SPAN CLASS="redtext">some red
text</SPAN>some more text
would render the "some red text" section in red.
<SPAN STYLE="color : #FF0000">some red
text</SPAN>
would do exactly the same. Refer to the Style Sheets topic for more information about
style sheets.
The <STYLE> tag should reside within the <HEAD>
element and is used to delimit Style Sheet information. The TYPE
and TITLE attributes can be used within the
<STYLE> element. TYPE is used to specify the internet media
(MIME) type of the style sheet definition (which is
"text/css") and TITLE can be used to provide a title
for the style sheet definitions. This may be used by browsers
when a choice of style sheets are available.
Example :
<HTML>
<HEAD>
<TITLE>Introduction to Style Sheets</TITLE>
<STYLE TYPE="text/css" TITLE="Bright
Colours">
BODY { color : white}
P { color : blue;
font-size : 12pt;
font-family : Arial}
H1 { color : red; font-size : 18pt}
</STYLE
</HEAD>
<BODY>
Defines the styles that are specified within the <STYLE>
... </STYLE> elements to be a style sheet, having the title
"Bright Colours". For more information about Style
Sheets, refer to the Style
Sheets topic.
Use of the <STYLE> tag and Style Sheet use in general is
Internet Explorer specific.
The <SUB> tag specifies that the enclosed text should be
displayed as a subscript, and if practical, using a smaller font
(compared with normal text).
This is the main text, with <SUB>this bit</SUB> being
subscript.
The above sentence will be displayed as "This is the main
text, with this bit being subscript.
The selected text will be made a subscript to the main text, formatting the selected text slightly smaller than the normal text. Browsers can be forced to make subscripts even smaller by compounding the <SUB> ... </SUB> element with the <SMALL> ... </SMALL> element, or be forced to render the subscript the same size as the normal text, by compounding the <SUB> ... </SUB> element with the <BIG> ... </BIG> element. The exact appearance of the subscript text will change depending on any <FONT SIZE=...> and <BASEFONT SIZE=...> settings, if specified. <SUB> can also take the CLASS, ID and STYLE attributes to allow style sheet definitions to be applied to it. For more details of these attributes, refer to the Style Sheets topic.
It is similar to SUB tag except that this is a superscript. For example, "This is normal and this is <SUP>superscript</SUP>" will be displayed as "This is normal and this is superscript.