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.


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>


You can't run applets. Here's what you'd see if you could.

12sound.gif




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
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.
TOP  
TOP

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).
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.
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.
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.
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

<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.
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>!!!

<P>NOEMBED image: <IMG SRC="jpg/GoldPetals.jpg" WIDTH="100" HEIGHT="100"></P>
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.
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
 
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>
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>
HOME            MAIN            PREV