-- techteach menu -- main menu --

Embedding or Linking?



You can add objects such as a file, an image or an audio file to a Word document, an Excel spreadsheet, an HTML document by linking or embedding.

The main difference between linking and embedding is where the data are stored and how they are updated after they where linked or embedded.

Your file links to a source file: the data are stored in the source file and updated there, showing the updates in your source file.
Your file embeds a source file: the data are now stored in your file -- without a connection to the original source file.


For Word, see
Using Word -- for linking to or embedding an object in a Word document

For HTML Embed, see
Embed_tag_syntax.html
Embedded_sound_clip1.html
Embedded_sound_clip2.html
Embedding with Quicktime
Link to a sound clip


The following is for use with an HTML document.

Linking:

It is easy:
Create a new or open an existing HTML document on your computer, click where you want to insert something. Use the Insert Menu and click on Image or Link. Your HTML file then has a link to an external file which will open when the link is clicked.  (If you insert a table, you must enter data and the table is part of your HTML file.)

Click on Image:
Both your HTML file and the image file should be in the same folder, before you create the link.
For use on a website, upload both your HTML file and the image.
For e-mail or Blackboard, zip the two files, and e-mail or upload to Blackboard as a package.
The recipient must download the zipped file and have a viewer to see the image.

Click on Link to link to an existing HTML file on the web:
Upload your file to your website or to Blackboard.

Click on Link to link to an existing HTML file on your computer:
Upload both files to your website.
For Blackboard, make sure that both files are in the same folder, zip them, then upload the package to Blackboard.
(Remember, that Bb assigns a different location for every file, so your link will no longer work.)

Click on Link to link to an existing media clip on your computer:
Both your HTML file and the media clip should be in the same folder.

For e-mail and Blackboard:
Zip both files. E-mail or upload the zip package to Bb.

For a webpage, you have two options:
1) First, upload the media clip to the website. Link to it in your HTML file, then upload the HTML file.
OR
2) Insert a link in your HTML file to the zip file. Then upload both the HTML file and the zip file to the website.


For a Blackboard class, you can create a CD ROM for distribution, to be used as a link or independently.


Embedding:

Please note that the <Embed> tag is no longer part of the current HTML language. Javascript is used instead. But it basically still works with the current browsers.
The following is adapted from older Netscape help files found on the web; some details may no longer apply.


The
<EMBED> tag is the most common way of adding sound to a Web page. Its advantage over the <BGSOUND> tag is that it is supported by both the Internet Explorer and Netscape Navigator browsers, and more consistently across the PC and Mac platforms. The <EMBED> tag introduces many features that are not supported by <BGSOUND>. Furthermore, while the <BGSOUND> tag only supports background sounds, the <EMBED> tag also features an interactive interface (including various buttons to play, stop, and handle the sound).
 
The basic HTML code that generates a control panel is very simple: see Embedded_sound_clip2.html

<EMBED SRC="Waltz.mid" VOLUME="50" HEIGHT="60" WIDTH="144">

Try reading this page on both browsers. You'll be surprised to see that the design of the control panel is totally different. For example, Navigator's control panel includes a volume control while Explorer's has a position control. Also, Navigator 4.0.5 uses a different control panel than 4.0.4. Explorer features an optional digital display, invoked by right-clicking the control panel. Navigator does not have a digital display.

JavaScript support is also different between the two browsers. Navigator and Explorer support different sets of the <EMBED> attributes.

Here are the attributes supported by both browsers:
Attribute Description
SRC="URL" Specifies the URL of the sound file. Sound files can be in any recognizable format (For example: "midi, wav, au")
WIDTH="n" Specifies the width of the control panel. The optimal width to use is 144 pixels. Navigator chops the control panel if a smaller value is used (or if the attribute is omitted altogether), and adds a blank area to its right side, if a larger number is specified. Explorer also yields a reasonable panel with this value.
HEIGHT="n" Specifies the height of the control panel. The optimal width to use is 60 pixels. Navigator chops the control panel if a smaller value is used (or if the attribute is omitted altogether), and adds a blank area on its top, if a larger number is specified. Explorer also yields a reasonable panel with this value.
ALIGN="alignoption" Specifies how the alignment of the control panel should be, much like the alignment of images (<IMG> tag). Possible options are: TOP, BOTTOM, CENTER, BASELINE, LEFT, RIGHT, TEXTTOP, MIDDLE, ABSMIDDLE, or ABSBOTTOM.
NAME="name" Specifies the name of the object. Can be used to access the object from JavaScript via document.name
HIDDEN="true"|"false" Specifies if the embedded object is visible (HIDDEN="false") or hidden (HIDDEN="true"). The default is HIDDEN="false".

The following attributes are not supported by both browsers:

Attribute Description
VOLUME="n" Specifies the sound volume. Can range from 0 to 100, 50 is the default. Navigator's control panel reflects this setting when the element is loaded. Supported only by Netscape Navigator. The Windows 95's default is 50 (midpoint), while that on the Mac is 75.
LOOP="true"|"false"|"n" Specifies if the sound should be played continuously (LOOP="true"), for a specified number of times (n), or should not be repeated (LOOP="false"). Supported only by Navigator; You will get continuous sound on Explorer. For same effect on Explorer, use playcount (see below).
PLAYCOUNT="n" Specifies the number of times to play the sound. Supported only by Explorer.
PLUGINSPAGE="URL" Specifies the location of the plug-in software needed to run the sound file. This attribute is needed only if the plug-in software is not one of the common ones that are already installed on the computer. Supported only by Navigator.
PLUGINURL="URL" Specifies the location of the software needed to install the specified plug-in (JAR Installation Manager). This attribute is needed only if the plug-in software is not one of the common ones that are already installed on the computer. Supported only by Navigator.
HREF="URL" Converts the control panel into a hyperlink. Works like <A HREF="URL"> and only with Explorer.
TARGET="URL" Converts the control panel into a hyperlink. Works like <A TARGET="URL"> and only with Explorer.
AUTOSTART="true"|"false" Indicates if the sound track should start automatically upon loading. A "true" value means it should, a "false" value means it should not. The Explorer's default is "false" while Navigator's one is "true". The default on the Mac is "false" for both browsers.
STARTTIME="mm:ss" Indicates the spot on the track where to begin playing. Notice that the playing will start immediately, at the specified spot. The spot is specified in minutes from the beginning of the track. The track begins to play immediately when you download it (AUTOSTART="true"), or when you hit the play button (AUTOSTART="false"). Time is denoted in minutes and seconds. If you specify a time longer than the soundtrack length, the browser will give you an error. Supported only by Navigator.
ENDTIME="mm:ss" Indicates the spot on the sound track where to stop playing. The spot is specified in minutes from the beginning of the track. The track begins to play immediately when you download it (AUTOSTART="true"), or when you hit the play button (AUTOSTART="false"). Time is denoted in minutes and seconds. If you specify a time longer than the soundtrack length, the browser will give you an error. Supported only by Navigator.