Session 8 Examples
Embedded and Linked Audio | Embedded and Linked Video | Background Sounds | Java Applets | Marquee
To use these examples, type (or copy) the code into a new document, save as an htm file, then view in your browser. Modify the code to see what effect it has on the output. Experiment. Play.
Detailed instructions are available here
Note that each <html> block has to be saved as a separate htm file.
Embedded and Linked Audio
<html>
<head>
<title>Embedded Audio</title>
</head>
<body>
This file has an embedded mp3 file<br>
<br>
<embed src="low.mp3"></embed><br>
<br>
An alternative is to link to the file like this:<br>
<a href="low.mp3">low.mp3 (100kb)</a><br><br>
<embed src="high.mp3"></embed><br>
<br>
<a href="high.mp3">high.mp3 (480kb)</a>
</body>
</html>
Embedded and Linked Video
Supporting Files
(Right-click and save to your desktop)
<html>
<head>
<title>Embedded Video</title>
</head>
<body>
This file has an embedded quicktime file<br>
<br>
<embed src="viruses_480x376.mov" width="480" height="376"></embed>
<br>
<br>
An alternative is to link to the file like this:<br>
<a href="viruses_480x376.mov">viruses_480x376.mov (2.48 mb)</a>
</body>
</html>
Background Sounds
Supporting Files
(Right-click and save to your desktop)
<html>
<head>
<title>Background Sound</title>
<bgsound src="pulp.mid" loop="-1">
</head>
<body>
<p>This file has a background sound. Background sounds only work in Internet Explorer.</p>
<p>You can make background sounds work in most browsers by using the <embed> tag and setting the height and width to zero.</p>
</body>
</html>
Java Applets
Supporting Files
(Right-click and save to your desktop)
<head>
<title>Java Applet</title>
</head>
<body>
Here's an example of a java applet.<br>
<br>
<applet code="puzzle.class" width="513" height="248">
</applet>
</body>
</html>
Marquee Tag
<html>
<head>
<title>Marquee Tag</title>
</head>
<body>
The basic use of the marquee tag
<marquee>is simple. Put most any kind of markup between</marquee>
marquee tags and it will ...
<!-- Check out http://www.htmlcodetutorial.com/_MARQUEE.html for examples of attributes -->
</body>
</html>