HOME
MAIN
NEXT
PREV
HTML Inclusion Elements Summary
HOME
MAIN
NEXT
APPLET Element: Embedded Applet
Usage:
<APPLET>...</APPLET>
Can Contain: characters, character highlighting,
A, BR, IMG,
BASEFONT, MAP, SCRIPT, INPUT, SELECT, TEXTAREA, PARAM
Can Be Inside: ADDRESS, BLOCKQUOTE, BODY, CENTER, DIV, FORM,
PRE,
DD, DT, LI, P, TD,
TH, Hn
A, CAPTION, character highlighting
Attributes: ALIGN,
ALT, ARCHIVE, CODE, CODEBASE, HEIGHT, HSPACE,
MAYSCRIPT, NAME, VSPACE, WIDTH
APPLET is used to include an inline applet--at present, only Java applets
are supported. The attribute CODE specifies the URL at which the applet
is located (analogous to the SRC attribute of the IMG element),
while the attributes WIDTH and HEIGHT specify the height and width
required by the applet, in pixels. Parameter values required by the applet are
obtained from PARAM elements contained within the APPLET element.
NOTE: APPLET to Be replaced by OBJECT.
- Attributes:
- ALIGN="top", "middle", "bottom",
"left", "right" (optional) Specifies the alignment
of the applet with respect to the surrounding text.
- ALT="string" (optional) Specify the text string to be
use in place of the applet by browsers that are unable to run the
applet.
- ARCHIVE="url" (optional) (Netscape Navigator 3
only) Specifies an uncompressed ZIP format archive of classes. If
specified, the browser will download the specified ZIP file and will
search there for the CODE-specified applet and supporting classes
(code libraries). Classes not in the ZIP file will still be accessed
from the server, following the traditional manner.
- CODE="url" (mandatory) Specifies the URL of
the applet to be run.
- CODEBASE="url" (optional, depending on
situation) Specifies the code base for the applet selected by the CODE
attribute, where the code base is simply the directory or location
containing any supporting class libraries required by the applet. If the
supporting libraries are at the same location as the program itself,
then CODEBASE is superfluous and can be omitted.
- HEIGHT="number" (mandatory) Specifies the
height required by the embedded applet, in pixels. This is mandatory, as
a browser has no other way of knowing how big a display area the applet
requires.
- HSPACE="number" (optional) Specifies a padding
space, in pixels, to be left to the left and right of the applet. This
creates an extra space between the applet and the surrounding document.
Not supported by Netscape.
- MAYSCRIPT (optional) Gives the applet permission to communicate
with JavaScript programs.
- NAME="string" (optional) Specifies a name that
identifies the applet for external reference. This let other programs,
such as script programs within the document, reference and communicate
with the named applet.
- VSPACE="number" (optional) Specifies a padding
space, in pixels, to be included above and below the applet. This
creates an extra space between the applet and the surrounding document.
Not supported by Netscape.
- WIDTH="number" (mandatory) Specifies the width
required by the embedded applet, in pixels. This is mandatory, as a
browser has no other way of knowing how big a display area the applet
requires.
- Examples:
- Example 1: APPLET with CODE
CODEBASE HEIGHT WIDTH ALT
TOP
<P><APPLET CODE="SoundExample.class"
CODEBASE="sounds/AppletSoundExample/"
HEIGHT="50"
WIDTH="450"
ALT="sounds/AppletSoundExample/SoundExample.class">
<BLOCKQUOTE><HR>You can't run applets.
Here's what you'd see if you could.
<P><CENTER><IMG SRC="sounds/AppletSoundExample/12sound.gif"
WIDTH="397"
HEIGHT="35"
ALIGN="BOTTOM"
NATURALSIZEFLAG="3"
ALT="12sound.gif"></CENTER></P><HR>
</BLOCKQUOTE>
</APPLET>
HOME
MAIN
NEXT
PREV
PARAM Element: Define an Applet Parameter
Usage:
<PARAM>
Can Contain: empty
Can Be Inside: APPLET
Attributes:
NAME, VALUE
PARAM assigns a value to any required applet-dependent variable. The
variable name is specified via the NAME attribute, while the value for
this variable is specified by VALUE.
- Attributes:
- NAME="string" (mandatory) Specifies a name to be
associated with this parameter. NAMEs must be understood by the
associated applet.
- VALUE="string" (optional) Specifies the value to be
associate with the given name. Again, the value must be meaningful to
the specified applet. If a value is not needed, this attribute can be
left out.
HOME
MAIN
NEXT
PREV
IMG Element: Inline Image
Usage:
<IMG>
Can Contain: empty
Can Be Inside: ADDRESS, BLOCKQUOTE, BODY, CENTER, DIV, FORM,
DD, DT, LI, P, TD,
TH, Hn
A, CAPTION, character highlighting
Attributes: ALIGN,
ALT, BORDER, HEIGHT, HSPACE, ISMAP,
SRC, USEMAP, VSPACE, WIDTH,
(LOWSRC: Netscape only)
(CONTROLS, DYNSRC, LOOP, START: Internet
Explorer only)
IMG includes an image file inline with the document text, the image file
being specified by the SRC attribute. There are currently four common image
formats used for inline images. GIF format (*.gif), X-Bitmaps (*.xbm),
X-Pixelmaps (*.xpm), and JEG (*.jpeg, or *.jpg). A fifth format, Portable
Network Graphics or PNG (*.png), is expected to be widely supported by the next
generation of browsers.
- Attributes:
- ALIGN="bottom", "middle", "top", "left",
"right", ("texttop", "absmiddle",
"baseline", "absbottom": Netscape Extension) (optional)
Specify the alignment of the image with the neighboring text. In
general, text does not wrap around an image aligned using the
"top", "middle", or "bottom" attribute
values, so that the images within a sentence can create big gaps between
adjacent lines.
- "bottom" aligns the bottom of the image with the
baseline of the surrounding text. Default.
- "middle" aligns the middle of the image with the
baseline of the text.
- "top" aligns the top of the image with the top of the
largest item in a line (including other images).
- "left" floats the image down and over to the left
margin, and allows subsequent text to flow around the right side of
the image.
- "right" floats the image to the right side of the
window, and allows subsequent text to flow around the left side of
the image.
- "texttop" aligns the top of an image with the top of the
surrounding text (the same as ALIGN="top").
- "absmiddle" aligns the middle of an image with the
middle of the line of text.
- "baseline" aligns the bottom of an image with the
baseline of the line of text (the same as ALIGN="bottom").
- "absbottom" aligns the bottom of an image with the
absolute bottom of the line (for example, the bottom tip of a letter
such as "q").
- ALT="string" (optional) Gives a text alternative for
the image, for use by text-only browsers.
- BORDER="number" (optional) Specifies the
border width, in pixels, around images that are marked as hypertext
anchors (recall that images are generally surrounded by a colored border
if they are inside an anchor). BORDER="0" indicates no
border around the image. With Netscape, BORDER will also place border
around images that are not inside A elements.
- CONTROLS
(optional) (Internet Explorer only) Indicates that a set of video or
VRML controls should be displayed along with the inline viewer. If
CONTROLS is absent, then the controls are not displayed.
- DYNSRC="url"
(optional) (Internet Explorer only) Specifies the URL of an AVI-format
video slip or a VRML world description file to be included inline with
the document. The attributes CONTROLS, LOOP, LOOPDELAY,
and START are used to control the behavior of the video clip or
VRML scene. Both DYNSRC and SRC can be specified in the
same IMG element, so that a DYNSRC-incapable browser can
display a regular image file in place of the VRML data or video
sequence.
- HEIGHT="number" or "number%"(optional) Specifies the
height of the image to be displayed, in pixels. The HEIGHT and WIDTH
attributes let the browser format the text before actually loading the
image. Browsers will rescale the image to fit this height.
- HSPACE="number" (optional) Specifies the horizontal
space, in pixels, to be left between the image and the surrounding text.
- ISMAP (optional) Marks the image as an active image. When the
user clicks the mouse over the image, the coordinates of the mouse
pointer are sent back to the server. The ISMAP-activated IMG
element must, consequently, be enclosed within an anchor A element,
specifying the URL to which the data should be sent.
Click here to see
examples of IMG and ISMAP.
- LOOP="number", "infinite"
(optional) (Internet Explorer only) Specifies how many times the video
clip should be looped before stopping. LOOP="-1" or LOOP="infinite"
means that the loop will play indefinitely. Default is 1.
- LOOPDELAY="number" (optional) (Internet
Explorer only) Specifies the delay, in milliseconds, between subsequent
replays of the video clip. Default is 0.
- LOWSRC="url" (optional) (Netscape only)
Specifies the URL of an image file to be loaded and displayed prior to
loading and displaying the image indicated by the SRC attribute. LOWSRC
usually references a placeholder image that can be loaded and displayed
more rapidly than the full resolution version (specified by SRC).
- SRC="url" (mandatory) Specifies the URL of the
image file to be included inline.
- START="fileopen", "mouseover"
(optional) (Internet Explorer only) Indicates when a video clip should
begin playing: START="fileopen" specifies that it plays
as soon as the video file is downloaded, while START="mouseover"
specifies that it plays when the mouse pointer is moved over the viewing
window. Both can be specified, separated by commas: START="fileopen,mouseover"
will invoke both behaviors.
- USEMAP="url" (optional) Almost all current
browsers support client-side imagemaps, whereby a document can
contain, within a MAP element, imagemap coordinate data. An IMG
element references a MAP element via the USEMAP attribute,
which takes, as its value, either a fragment identifier (the MAP
is in the same file as the IMG element) or in principle a full
URL plus a fragment identifier. (The MAP is in a separate
document: Note, however, that this form is not currently supported.)
Each MAP element must consequently be identified by an
appropriate NAME attribute value.
A developer can specify both USEMAP and ISMAP in the same IMG
element, with USEMAP having precedence.
<A HREF="/cgi-bin/imagemap/mapfile1"><IMG
SRC="image.gif" USEMAP="map1" ISMAP></A>
<MAP NAME="map1">
<AREA SHAPE="rect" COORDS="10,20,50,50"
HREF="stuff.html">
<AREA SHAPE="rect" COORDS="30,40,60,60"
HREF="otherstuff.html">
...
</MAP>
Click here to see
examples of IMG and USEMAP.
- VSPACE="number" (optional) Specifies the
vertical space, in pixels, to be left between the image and the
surrounding text (above and below).
- WIDTH="number" or "number%" (optional) Specifies the width of the
image to be displayed, in pixels. The HEIGHT and WIDTH
attributes let the browser format the text before actually loading the
image. Browsers will rescale the image to fit this width if the image is
actually a difference size.
- Examples:
- Example 1: IMG with different ALIGN values
- Example 2: IMG with ALT BORDER and align image in the center.
- Example 3: IMG with ISMAP
USEMAP
TOP
- Example 1: IMG with different ALIGN values
-
Example: <IMG SRC="jpg/497_14WebTuong.jpg"
WIDTH="50"
HEIGHT="50"
ALIGN="top"
ALT=[jpg/497_14WebTuong.jpg]>top
text
Example:
top text
- Example: <IMG SRC="jpg/497_14WebTuong.jpg"
WIDTH="50"
HEIGHT="50"
ALIGN="middle"
ALT=[jpg/497_14WebTuong.jpg]>top
text
Example:
middle text
- Example: <IMG SRC="jpg/497_14WebTuong.jpg"
WIDTH="50"
HEIGHT="50"
ALIGN="bottom "
ALT=[jpg/497_14WebTuong.jpg]>bottom
text
Example:
bottom text
- Example: <IMG SRC="jpg/497_14WebTuong.jpg"
WIDTH="50"
HEIGHT="50"
ALIGN="left "
ALT=[jpg/497_14WebTuong.jpg]>left
text
Example:
left text.
- Example: <IMG SRC="jpg/497_14WebTuong.jpg"
WIDTH="50"
HEIGHT="50"
ALIGN="right "
ALT=[jpg/497_14WebTuong.jpg]>right
text
Example:
right text.
- Example: <IMG SRC="jpg/497_14WebTuong.jpg"
WIDTH="50"
HEIGHT="50"
ALIGN="texttop"
ALT=[jpg/497_14WebTuong.jpg]>texttop
text
Example:
texttop text
- Example: <IMG SRC="jpg/497_14WebTuong.jpg"
WIDTH="50"
HEIGHT="50"
ALIGN="absmiddle"
ALT=[jpg/497_14WebTuong.jpg]>absmiddle
text
Example:
absmiddle text
- Example: <IMG SRC="jpg/497_14WebTuong.jpg"
WIDTH="50"
HEIGHT="50"
ALIGN="baseline"
ALT=[jpg/497_14WebTuong.jpg]>baseline
text
Example:
baseline text.
- Example: <IMG SRC="jpg/497_14WebTuong.jpg"
WIDTH="50"
HEIGHT="50"
ALIGN="absbottom"
ALT=[jpg/497_14WebTuong.jpg]>absbottom
text
Example:
absbottom text.
-
Example: <IMG SRC="jpg/GoldPetals.jpg"
WIDTH="100%"
HEIGHT="50"
ALT="[GoldPetals.jpg]">
Example:
TOP
- Example 2: IMG with ALT BORDER and align image in the center.
HOME
MAIN
NEXT
PREV
FRAMESET Element: Declare a FRAME Document
Usage:
<FRAMESET>...</FRAMESET>
Can Contain: FRAME, FRAMESET,
NOFRAMES
Can Be Inside: HTML
Attributes: BORDER,
BORDERCOLOR, COLS, FRAMEBORDER, FRAMESPACING, ROWS
FRAMESET divides a region of a framed document into frames. An HTML
document containing a FRAMESET cannot contain BODY content, other
than within s NOFRAMES. If you include regular BODY element tags
prior to the first FRAMESET, Netscape Navigator browsers will entirely
ignore the FRAME and FRAMESET elements, and will display the NOFRAMES
content (if any).
- Attributes:
- BORDER="number" (optional) (Netscape Navigator
only) Specifies the width of the frame border, in pixels, the default
being 5. BORDER can only be set on the outermost FRAMESET element.
Scroll bars, if needed in a frame. are placed inside the frame border. BORDER="0"
is borderless.
- BORDERCOLOR="#rrggbb", "color"
(Optional) (Netscape Navigator only) Specifies the color of the frame
borders.
- COLS="comma-separated frame widths" (one of ROWS,
COLS is mandatory) Specifies the widths of a selection of
vertically oriented frames, where the terms specifying the width are
separated by commas. The number can be fixed pixel number, percentage
number, or relative number (*). Examples:
COLS="100,200,300,*", COLS="2*,3*,*" (2/6, 3/6,
1/6), COLS=(10%,80%,10%).
- FRAMEBORDER="yes", "no" (optional) Specifies
how the frame border should be drawn. "yes" draws
three-dimensional borders (the default). "no" draws a plain
border. BORDER="0" means no borders are drawn
regardless of the FRAMEBORDER setting.
- FRAMESPACING="number" (optional) (Internet
Explorer only) Specifies the spacing, in pixels, to leave between
internal frames.
- ROWS="comma-separated frame heights" (one of ROWS,
COLS is mandatory) Specifies the heights of a selection of
horizontally oriented frames, where the terms specifying the height are
separated by commas. The number can be fixed pixel number, percentage
number, or relative number (*). Examples:
ROWS="100,200,300,*", ROWS="2*,3*,*" (2/6, 3/6,
1/6), ROWS=(10%,80%,10%).
- Click here to see examples of
FRAMESET, and FRAME.
HOME
MAIN
NEXT
PREV
FRAME Element: A FRAME within a FRAMSET
Usage:
<FRAME>
Can Contain: empty
Can Be Inside: FRAMESET
Attributes: BORDERCOLOR,
FRAMEBORDER, MARGINHEIGHT, MARGINWIDTH,
NAME, NORESIZE, SCROLLING, SRC
FRAME defines the content of a frame within a FRAMESET element.
The SRC attribute references the HTML document to be placed within the FRAME.
If SRC is absent, the frame is simply left empty. The NAME
attribute assigns a specific name to the FRAME, and allows the frame to
be targeted using the TARGET attribute of anchor elements.
- Attributes:
- BORDERCOLOR="#rrggbb", "color"
(optional) Specifies the color of the frame borders. The color is
undefined if two neighboring FRAMEs try to set different colors to an
adjacent boundary. BORDERCOLOR is only valid with 3D frame borders--if
FRAMEBODER="no", then the borders are invisible.
- FRAMEBORDER="yes", "no" (optional) Specifies
how the frame border should be drawn. "yes" draws
three-dimensional borders (the default). "no" draws a plain
border. BORDER="0" means no borders are drawn
regardless of the FRAMEBORDER setting.
- MARGINHEIGHT="number" (optional) Specifies the
height, in pixels, of the top and bottom margins for the frame; the
default value is approximately 10, and is browser-specific. MARGINHEIGHT
cannot be less than 1, to ensure that there is some blank space left
between the frame content and the frame borders.
- MARGINWIDTH="number" (optional) Specifies the
width, in pixels, of the left and right margins for the frame; the
default value is approximately 10, and is browser-specific. MARGINWIDTH
cannot be less than 1, to ensure that there is some blank space left
between the frame content and the frame borders.
- NAME="name" (optional) Assigns a symbolic name to the
particular frame. The TARGET attribute of FORM or A
element can then direct retrieved documents or data to this named frame.
If NAME is absent, the frame name is undefined. Values for names
must be name tokens.
- NORESIZE (optional) Informs the browser that the frame size is
fixed and cannot be modified by the user--this also restricts resizing
of adjacent frames in the same window. If this attribute is absent and
if frame borders are present (see FRAMEBORDER), the frame can be
resized, usually be using the mouse to drag a border of the frame.
- SCROLLING="yes", "no", "auto"
(optional) Specifies the status of scroll bars for the frame.
"yes" means that the frame must always have a scroll bars.
"no" means that the frame should never have scroll bars. If
you specifies "no", you must be sure that the frame is large
enough to contain the desired document. "auto" lets the
browser include scroll bars when necessary. Default is "auto".
- SRC="url" (optional) Specifies the URL of the
HTML document to be displayed within the frame. SRC can be
absent, in which case the frame is initially blank.
- Click here to see examples of
FRAMESET, and FRAME.
HOME
MAIN
NEXT
PREV
NOFRAMES Element: Markup for FRAME-Incapable Browsers
Usage:
<NOFRAMES>...</NOFRAMES>
Can Contain: characters, character highlighting,
A, APPLET, BR, IMG,
ADDRESS, BLOCKQUOTE, BODY, CENTER, DIV, FORM,
PRE, TABLE,
DIR, DL, MENU, OL, UL,
MAP, SCRIPT, Hn, P, HR, [ISINDEX]
Can Be Inside: FRAMESET
Attributes: none
NOFRAMES contains HTML markup to be displayed by browsers that do not
understand the FRAMESET and FRAME elements. NOFRAMES
content will not be displayed by a FRAME-capable browser. A FRAME-incapable
browser, however, ignores the FRAMSET, FRAME, and NOFRAMES
elements, and displays the NOFRAMES content as if it were the BODY
of a regular HTML document.
- Click here to see examples of
NOFRAMES.
HOME
MAIN
NEXT
PREV
IFRAME Element: Insert Floating Document Frame (IE only)
Usage:
<IFRAME>...</IFRAME>
Can Contain: empty
Can Be Inside: Unspecified; probably: ADDRESS, BLOCKQUOTE, BODY, CENTER, DIV, FORM,
PRE,
DD, DT, LI, P, TD,
TH, Hn
A, CAPTION, character highlighting
Attributes: ALIGN,
FRAMEBORDER, HEIGHT, MARGINHEIGHT, MARGINWIDTH,
NAME, SCROLLING, SRC, VSPACE, WIDTH
IFRAME is a floating frame. IFRAME can be placed inside the
regular BODY and, in a sense, acts like an embedded object or image. The content
of a floating frame is specified by a SRC attribute.
- Attributes:
- ALIGN="bottom", "middle", "top", "left",
"right", (optional) Specifies the alignment of the floating frame on the page. The meanings
are the same as for the IMG element.
Default value is "bottom".
- FRAMEBORDER="1", "0" (optional) Sets the
display mode for the floating frame border. Default "1"
creates borders with a 3D effect. "0" produces no borders.
- HEIGHT="number", "number%" (optional, must
be specified if WIDTH is specified) Specifies the height of the
displayed floating frame, either in pixels, or as a percentage of the
available window height.
- HSPACE="number" (optional) Specifies a spacing
margin, in pixels, to leave to the left and right of the floating frame.
Default is 0 pixel. This is only relevant for "left", and
"right" aligned frames.
- MARGINHEIGHT="number" (optional) Specifies the
height, in pixels, of the top and bottom margins within the frame.
Default value is approximately 10, and is browser-specific. MARGINHEIGHT
cannot be less than 1, to ensure that there is some blank space left
between the frame content and the frame borders. If this attribute is
absent, the browser will itself determine an appropriate margin height.
- MARGINWIDTH="number" (optional) Specifies the width,
in pixels, of the left and right margins within the frame. Default value
is approximately 10, and is browser-specific. MARGINWIDTH cannot
be less than 1, to ensure that there is some blank space left between
the frame content and the frame borders. If this attribute is absent,
the browser will itself determine an appropriate margin width.
- NAME="name" (optional) Assigns a symbolic name to the
particular frame. The TARGET attribute of FORM or A
element can then direct retrieved documents or data to this named frame.
If NAME is absent, the frame name is undefined. Values for names
must be name tokens.
- SCROLLING="yes", "no", "auto"
(optional) Specifies the status of scroll bars for the frame.
"yes" means the frame must always have scroll bars.
"no" means that the frame should never have scroll bars and
you must be sure that the frame is large enough to contain the desired
document. "auto" lets the browser include scroll bars when necessary.
Default value is "no".
- SRC="url" (optional) Specifies the URL of the
HTML document to be displayed within the frame. SRC can be
absent, in which case the frame initially blank.
- VSPACE="number" (optional) Specifies a spacing
margin, in pixels, to leave above and below the floating frame. Default
is 0 pixel. This is only relevant for "left", and
"right" aligned frames.
- WIDTH="number", "number%" (optional, must
be specified if HEIGHT is specified) Specifies the width of the
displayed floating frame, either in pixels, or as a percentage of the
available window width.
TOP
<IFRAME SRC="IframeEx1.htm"
BORDER="20"
FRAMEBORDER="1"
ALIGN="left"
WIDTH="350"
HEIGHT="200">
<HR NOSHADE>
OK, So you don't understand <B>IFRAME</B>.
<HR NOSHADE>
</IFRAME>
<P> This is a paragraph after <B>IFRAME</B></P>
<BR CLEAR="all">
Here is the source of the file "IframeEx1.htm":
<HTML>
<HEAD>
<TITLE>HTML IFRAME Example 1</TITLE>
</HEAD>
<BODY>
<P>HTML IFRAME Example 1</P>
</BODY>
</HTML>
This is a paragraph after IFRAME
TOP
- Example 2: IFRAME
with NAME
<IFRAME SRC="IframeEx2.htm"
NAME="IframeEx1"
BORDER="20"
FRAMEBORDER="1"
ALIGN="left"
WIDTH="350"
HEIGHT="200">
<HR NOSHADE>
OK, So you don't understand <B>IFRAME</B>.
<HR NOSHADE>
</IFRAME>
<P> This is a paragraph after <B>IFRAME</B></P>
<BR CLEAR="all">
<p>Click <A
HREF="jpg/GoldPetals.jpg"
TARGET="IframeEx1">here</A>
to put the image jpg/GoldPetals.jpg into the
IFRAME named IframeEx1.</p>
<p>Click <A
HREF="IframeEx2.htm"
TARGET="IframeEx1">here</A>
to put the file IframeEx2.htm into the
IFRAME named IframeEx1.</p>
Here is the source of the file "IframeEx2.htm":
<HTML>
<HEAD>
<TITLE>HTML IFRAME Example 2</TITLE>
</HEAD>
<BODY>
<P>HTML IFRAME Example 2</P>
</BODY>
</HTML>
This is a paragraph after IFRAME
Click here to put the image jpg/GoldPetals.jpg into the
IFRAME named IframeEx1.
Click here to put the file IframeEx2.htm into the
IFRAME named IframeEx1.
HOME
MAIN
NEXT
PREV
EMBED Element: Embed an Arbitrary Data Object
Usage:
<EMBED>
Can Contain: empty
Can Be Inside: ADDRESS, BLOCKQUOTE, BODY, CENTER, DIV, FORM,
MULTICOL,
PRE, DD, DT, LI, P, TD, TH, Hn, NOEMBED, OBJECT,
A, CAPTION, character highlighting
Attributes: ALIGN,
AUTOSTART, BORDER, FRAMEBORDER, HEIGHT, HIDDEN, HSPACE, NAME,
PALETTE, PLUGINSPACE, P_NAME
(arbitrary name value), SRC, TYPE, VSPACE,
WIDTH
EMBED specifies an arbitrary data object to be embedded within the
document--for example an audio file, a special-format graphic file, or a
spreadsheet. Display of embedded objects requires extra functionality on a
browser, usually provided by browser plug-ins--product- or data-format-specific
modules that are loaded into the browser whenever the corresponding data format
is accessed.
The NOEMBED element can be used to provide an HTML alternative to the
embedded data for use by browsers that do not support the EMBED element
or that cannot process the specified embedded data type.
Note: EMBED to be replaced by OBJECT. The EMBED element
design has many problems; in particular its violation of important SGML syntax
rules and the inability to specify alternative or preferred plug-ins for
handling a given data type.
- Attributes:
- ALIGN="bottom", "middle", "top", "left",
"right", (optional) Specifies the alignment of the embedded object on the page. The meanings
are the same as for the IMG element.
Default value is "bottom".
- AUTOSTART (optional)
- BORDER="number" (optional) Specifies the size,
in pixels, of the border to be drawn around the displayed object.
Default is no border.
- FRAMEBORDER="1", "0" (optional) Sets the
display mode for the floating frame border. Default "1"
creates borders with a 3D effect. "0" produces no borders.
- HEIGHT="number" (mandatory) Specifies the height of the
embedded object, in pixels. Most standard plug-in modules are
distributed with the recommended heights and widths--if you don't know
the correct size, just try experimenting until you find appropriate
values.
- HIDDEN="true", "false" (optional) Specifies
whether the plug-in is displayed in the document ("false") or
is hidden from view ("true"). Default value is
"false".
- HSPACE="number" (optional) Specifies a
horizontal spacing, in pixels, to be left to the left and right of the
plug-in.
Default is 0 pixel.
- NAME="name" (optional) Specifies a symbolic name for
the embedded object. This allows the object to be referenced by other
objects, scripts, or applets embedded in the document, thereby allowing
objects to communicate with each other.
- PALETTE="background", "foreground"
(optional) Specifies the color palette to use in rendering the object,
in terms of the default color used by the browser. This is relevant only
for Microsoft Windows platforms.
- PLUGINSPACE="url" (optional) Specifies the URL
of a document containing instructions as to how to obtain the plug-in
required by the EMBEDded object. If the browser does not have an
appropriate plug-in, it will inform the user of this fact and will
optionally link to this supporting resource.
- P_NAME="string"
(optional) Specifies names and values required by the embedded object.
P_NAME is an arbitrary name, and "string" is a value to
associate with the name. These names and values are passed to the
plug-in program that displays the object, so that the names and values
must have meaning for that plug-in.
- SRC="url" (one of TYPE or SRC
mandatory) Specifies the URL ofor the data object to be inserted into the
document.
- TYPE="MIME_type" (one of TYPE or SRC
mandatory) Specifies the MIME type for the embedded object. This is used
in place of SRC when the plug-in requires no data, or when the plug-in
obtains the data itself.
- VSPACE="number" (optional) Specifies a
vertical spacing, in pixels, to be left above and below the plug-in. Default
is 0 pixel.
- WIDTH="number" (mandatory) Specifies the width of the
embedded object, in pixels. Most standard plug-in modules are
distributed with the recommended heights and widths--if you don't know
the correct size, just try experimenting until you find appropriate
values.
HOME
MAIN
NEXT
PREV
NOEMBED Element: HTML Alternative to EMBED
Usage:
<NOEMBED>...</NOEMBED>
Can Contain: Unspecified; probably: ADDRESS,
BLOCKQUOTE, CENTER, DIV, FORM, MULTICOL,
PRE, TABLE, HR, DIR, DL, MENU, OL, UL, P, Hn,
APPLET, EMBED, NOEMBED, SCRIPT, NOSCRIPT, OBJECT,
INPUT, SELECT, TEXTAREA,
characters, character highlighting, A, BR, IMG, MAP, SPACER, [ISINDEX]. WBR
Can Be Inside: Unspecified; probably: ADDRESS, BLOCKQUOTE,
BODY, CENTER, DIV,
FORM, MULTICOL, DD, LI, TD, TH, APPLET, OBJECT
Attributes: None
NOEMBED contains HTML markup to be used in place of the EMBED
object should the browser be unable to process EMBED. A browser that
understands EMBED and that can process the referenced data will display
the EMBEDded object, and will hide the content of NOEMBED. On the
other hand, a browser that does not understand EMBED will ignore the
EMBED and NOEMBED tags, and will treat the content of the NOEMBED
element as additional HTML markup to be displayed with the document. The
appropriate use of NOEMBED is to place the NOEMBED element just
after the associated EMBED.
Example:
<EMBED SRC="jpg/GoldPetals.jpg"
WIDTH="100"
HEIGHT="100">
<noembed>
<P>NOEMBED image: <IMG
SRC="jpg/GoldPetals.jpg"
WIDTH="100"
HEIGHT="100"></P>
</noembed>
Example Output: Note I added </EMBED>. Dreamweaver 4 crashes without
</EMBED>!!!
NOEMBED image: 
HOME
MAIN
NEXT
PREV
OBJECT Element: Embed an Arbitrary Data/Program Object
Usage:
<OBJECT>...</OBJECT>
Can Contain: empty
Can Be Inside: ADDRESS, BLOCKQUOTE, BODY, CENTER, DIV, FORM,
MULTICOL,
PRE, DD, DT, LI, P, TD, TH, Hn, NOEMBED, OBJECT,
A, CAPTION, character highlighting
Attributes: ALIGN,
AUTOSTART, BORDER, FRAMEBORDER, HEIGHT, HIDDEN, HSPACE, NAME,
PALETTE, PLUGINSPACE, P_NAME
(arbitrary name value), SRC, TYPE, VSPACE,
WIDTH
EMBED specifies an arbitrary data object to be embedded within the
document--for example an audio file, a special-format graphic file, or a
spreadsheet. Display of embedded objects requires extra functionality on a
browser, usually provided by browser plug-ins--product- or data-format-specific
modules that are loaded into the browser whenever the corresponding data format
is accessed.
The NOEMBED element can be used to provide an HTML alternative to the
embedded data for use by browsers that do not support the EMBED element
or that cannot process the specified embedded data type.
Note: EMBED to be replaced by OBJECT. The EMBED element
design has many problems; in particular its violation of important SGML syntax
rules and the inability to specify alternative or preferred plug-ins for
handling a given data type.
- Attributes:
- ALIGN="bottom", "middle", "top", "left",
"right", (optional) Specifies the alignment of the embedded object on the page. The meanings
are the same as for the IMG element.
Default value is "bottom".
- AUTOSTART (optional)
- BORDER="number" (optional) Specifies the size,
in pixels, of the border to be drawn around the displayed object.
Default is no border.
- FRAMEBORDER="1", "0" (optional) Sets the
display mode for the floating frame border. Default "1"
creates borders with a 3D effect. "0" produces no borders.
- HEIGHT="number" (mandatory) Specifies the height of the
embedded object, in pixels. Most standard plug-in modules are
distributed with the recommended heights and widths--if you don't know
the correct size, just try experimenting until you find appropriate
values.
- HIDDEN="true", "false" (optional) Specifies
whether the plug-in is displayed in the document ("false") or
is hidden from view ("true"). Default value is
"false".
- HSPACE="number" (optional) Specifies a
horizontal spacing, in pixels, to be left to the left and right of the
plug-in.
Default is 0 pixel.
- NAME="name" (optional) Specifies a symbolic name for
the embedded object. This allows the object to be referenced by other
objects, scripts, or applets embedded in the document, thereby allowing
objects to communicate with each other.
- PALETTE="background", "foreground"
(optional) Specifies the color palette to use in rendering the object,
in terms of the default color used by the browser. This is relevant only
for Microsoft Windows platforms.
- PLUGINSPACE="url" (optional) Specifies the URL
of a document containing instructions as to how to obtain the plug-in
required by the EMBEDded object. If the browser does not have an
appropriate plug-in, it will inform the user of this fact and will
optionally link to this supporting resource.
- P_NAME="string"
(optional) Specifies names and values required by the embedded object.
P_NAME is an arbitrary name, and "string" is a value to
associate with the name. These names and values are passed to the
plug-in program that displays the object, so that the names and values
must have meaning for that plug-in.
- SRC="url" (one of TYPE or SRC
mandatory) Specifies the URL ofor the data object to be inserted into the
document.
- TYPE="MIME_type" (one of TYPE or SRC
mandatory) Specifies the MIME type for the embedded object. This is used
in place of SRC when the plug-in requires no data, or when the plug-in
obtains the data itself.
- VSPACE="number" (optional) Specifies a
vertical spacing, in pixels, to be left above and below the plug-in. Default
is 0 pixel.
- WIDTH="number" (mandatory) Specifies the width of the
embedded object, in pixels. Most standard plug-in modules are
distributed with the recommended heights and widths--if you don't know
the correct size, just try experimenting until you find appropriate
values.
HOME
MAIN
NEXT
PREV
SCRIPT Element: Include a Program Script
Usage:
<SCRIPT>...</SCRIPT>
Can Contain: Script program code (characters)
Can Be Inside: HEAD,
BODY,
any BODY
element that allows content
Attributes: LANGUAGE,
SRC, TYPE
SCRIPT is used to include program scripts within an HTML document. The
content of the element is treated as script program code, and is executed, if
possible, by the browser. Browsers that do not understand SCRIPT elements or the
language in which the script is written should ignore this element and its
content. To hide the text from browsers that do not understand SCRIPT, the
actual text code should be placed inside an HTML comment. Example:
<SCRIPT LANGUAGE="JavaScript">
<!--
...Script Code Here...
// -->
</SCRIPT>
When a browser parses a document for script components, it starts at the
beginning of the file and works downwards. As a result, any required functions
must be defined before they are used--if this is not done, and the function is
not defined at the time of its intended invocation, then the script will fail,
claiming that the function is undefined. Consequently, function definitions are
best placed in the HEAD of a document.
Scripting languages become much more dynamic when they are bound to user input
elements. In HTML, the basic user input elements are the anchor element A
and the various FORM input element. Both JavaScript and VBScript provide
these bindings through the special event handlers list in the following table.
HTML Event Handler Attributes
| Attribute |
Description |
| onAbort |
Triggered when the browser user aborts the loading of an image file. |
| onBlur |
Triggered when the associated FORM input element loses focus
(i.e., the user selects text outside the element, or selects another input element. |
| onChange |
Triggered when a FORM element both loses focus and has been modified
(for example, by user input of text, or by selecting a button). |
| onClick |
Triggered when a FORM-element button or a hypertext link
has been selected ("click"). |
| onError |
Triggered by an error in a JavaScript program. This event is not
available as an HTML attribute, since the event is not specific
to a particular element. |
| onFocus |
Triggered when a FORM input element is selected, usually by
clicking the mouse button within the element, or by using the Tab
key to advance to a new item. |
| onLoad |
Triggered when the document is loaded. |
| onMouseOut |
Triggered when the associated hypertext link is deselected
(e.g., the mouse moves off the link). |
| onMouseOver |
Triggered when the associated hypertext link is selected
(e.g., the mouse moves on top of the link). |
| onReset |
Triggered when a FORM reset button is pressed. |
| onSelect |
Triggered when text is selected within a TEXTAREA or within
an INPUT element that accepts text input (TYPE="text" or "password").
This is different fron onFocus, as onFocus is triggered by selecting
the element, even if text has not been selected. |
| onSubmit |
Triggered when a FORM is submitted. |
| onUnload |
Triggered when the document is unloaded (e.g., the user selects
to move to another page). |
HTML Elements and Supported Event Handling Attrbutes
Italicized handlers and handled elements were added as of Netscape 3.
Boldface Handlers are currently unreliable and should not be used.
| Element Type |
Supported Event Handlers |
| AREA (Netscape 3+ only) |
onMouseOut
onMouseOver |
| A |
onClick
onMouseOut onMouseOver |
| IMG (Netscape 3+ only) |
onAbort
onLoad |
| INPUT TYPE="button" |
onClick |
| INPUT TYPE="checkbox" |
onClick |
| INPUT TYPE="radio" |
onClick |
| INPUT TYPE="reset" |
onClick |
| BODY |
onBlur
onFocus
onLoad
onUnload |
| FRAMESET |
onBlur
onFocus
onLoad
onUnload |
| SELECT |
onBlur
onChange
onFocus |
| TEXTAREA |
onBlur
onChange
onFocus
onSelect |
| INPUT TYPE="text" |
onBlur
onChange
onFocus
onSelect |
| INPUT TYPE="password" |
onBlur
onChange
onFocus
onSelect |
| FORM |
onSubmit
onReset |
- Attributes:
- LANGUAGE="string" (optional) (Netscape and Internet
Explorer only) Specifies the language of the script contained within the
SCRIPT element. The only commonly supported values are
"JavaScript" and "VBScript". Internet Explorer
supports both languages. Netscape 3 supports only JavaScript.
- SRC="url" (optional) Specifies
the URL of a file that contains a script. The browser should access the
file, and load the script as if it were included inline with the
document.
- TYPE="string" (optional) (Netscape only) Gives
the MIME type for the script referenced by the SRC attribute.
- Click here to see examples of SCRIPT.
HOME
MAIN
NEXT
PREV
NOSCRIPT Element: HTML Alternative to SCRIPT
Usage:
<NOSCRIPT>...</NOSCRIPT>
Can Contain: Unspecified; apparently depends on context
Can Be Inside: Unspecified; apparently depends on context
Attributes: none
NOSCRIPT is a container for HTML markup to be used in place of SCRIPT
element output by browsers that do not understand SCRIPT. NOSCRIPT can
apparently contain any BODY-content markup, provided that content is permitted
at the location occupied by NOSCRIPT. A NOSCRIPT must immediately follow the
SCRIPT with which it is associated. Example:
<SCRIPT>
...script element content...
</SCRIPT>
<NOSCRIPT>
...HTML alternative to the preceding script...
</NOSCRIPT>
- Click here to see examples of SCRIPT.
HOME
MAIN
PREV
SEVER Element: Sever-Side Scripting (Netscape only)
Usage:
<SERVER>...</SERVER>
Can Contain: Unspecified; apparently depends on context
Can Be Inside: Unspecified; apparently depends on context
Attributes: none
SERVER allows the scripts to be processed by the server, prior to the
delivery of the document. SERVER acts just like SCRIPT (that is,
it is a container for a JavaScript program), except that the content is executed
on the server, and not on the client. Example:
<SERVER>
...script SERVER element content...
</SERVER>
- www.netscape.com and search for
documentation on LiveWire for more details, if any.
HOME
MAIN
PREV