Multimedia

Multimedia

Introduction

In multimedia, you will learn how to provide the songs, video and picture (images) in your web page. How it will feel to you that whenever you open your web page it starts singing, playing movie, or display your family picture.

You can learn all of these things very easily. Just go on reading the Chapter and learn the Magic of the multimedia elements.


Working with Images

In this section you will learn about "how the images can be used in HTML".

1. How you can create a page with image as background.

2. How you can make a picture as a hyperlink to another file (any type of file).


How to Hyperlink an Image

To hyperlink an image first we have to insert the image on the web page. So question is how to insert the image on the web page. In html the image can be inserted using the <img> tag. <img> tag has the attributes like width, height and src, which specifies the height and width of the image that is to displayed on the web page and scr has the value of the path where the image is stored.

<img> tag does not have the end tag.

So now use the <img> tag.

Format of <img> tag :
<img src="path" width="number" height="number">

Example:
<img src="img\logo_in.gif" width="200" height="200"> Remember the file & path of the file you provided in the src attribute of the any tag should be correct and must exist.

The example inserts the image "logo_in.gif" with the height of 200 pixel and width of 200 pixel. By using this tag you can insert the image in your html file, now if you want to create this image the hyperlink then follow the steps.

How to make the image as Hyperlink

Format:
<a href="path_of_file" > <img src="path" width="number" height="number"></a>

Example:
<a href="list.html"><img src="img\logo_in.gif" width="200" height="200"></a>

To make an image as hyperlink just enter the <img> tag between the <a> anchor tag.


Working with the Video and Audio file Files

Now you can make the web page containing the video file or whenever you open your page a moviestarts playing in it. All this can be done using the <bgsound>, <img> & <embed> tags. Only there are some extra attributes added for the playing the video files (movie).

These attributes are:
<bgsound> Tag

This tag is used to insert only audio files on the page. This tag does not provides the control on the audio file.

Format:
<bgsound src="path of audio file" loop="positive integer">

Attributes

Attribute
Value
Description
src
path of audio file
Defines the path of the audio file.
loop
positive integer
Defines the no. of times the file must be played.

So now lets do some practical.
Just write/copy this example on any text editor new file and save the file and open in the browser and see how it looks.

Example:
<html>
<body>
<p>
<b>starts on file open</b><br>
<bgsound src="music/border.wav" loop="5">
<br>
</body>
</html>


<img> Tag
<img> tag is used to insert the audio & Video files.

Format:
<img border="0" dynsrc="img\dog.mpg" start="fileopen" loop="0" width="134" height="138">

This will add the video file to your page.


How to add the audio files to your page

If you want to add the audio file then just replace the name of the video file with the other audio file name.

Example:
<img border="0" dynsrc="img\border.wav" start="fileopen" loop="0" width="134" height="138">

Attribute
Value
Description
dynsrc
path_of_movie_file
Defines the path of movie file.
start
fileopen, mouseover
Defines the instances on which movie starts playing.
loop
0 to n , infinite
Defines the no. of times movie should repeat.
width, height
pixels
Defines the height & width of movie window.
border
0 to n
Defines the width of border of movie window.


Start
if you want that movie starts playing when page gets opened then use start="fileopen", if you want that it should open when mouse pointer moves over it then use start="mouseover".

Loop
If want to play the movie in repeating manner then use loop="infinite" or you can provide the value 0 to n.
if loop="0" then movie will play only one time.




Comments

Popular posts from this blog

1.Introduction of HTML

HTML Lists