INSERTING IMAGES AND SOUND

In Lesson 3, you learned only how to communicate with images and sounds. Now you will learn how to put them into your Web page!

    
When inserting an image, you can use either .gif.jpg.bmp, or even .png graphic files. So how do you choose when to use which? .bmp (Bitmap Images) are slow loading, take up much diskspace, but are high in quality. Gifs (Graphic Interchange Format) are fast-loading, small, but poor in quality. However, they are the popular format to use in Web designing. JPEG (Joint Photographic Experts Group) images are best used for your photographs: fast, low in diskspace, and OK quality. Finally, .png (Portable Network Graphics) images are similiar to .bmp files, except they are fast-loading.

     
To insert an image into your page, use the following format (either one or none of the given attributes may be used, it's up to you):
<img alt="My Photo" border="1" src="graphicfile">
     


The ALT attribute is decided upon you. It stands for "alternative text", and will allow a small popup box with text to appear when your mouse moves over, or hovers the image. Use this when you wish to give a breif description of an image, give its name, etc. You may choose not to even add anything, and allow it to look like this: alt="". The BORDER attribute sets a picture frame around the image. I give the effect of my photo with a border and alternative text below. You may choose any number, but too big of a number will not look good.

   



  Finally, you may use an image with a link to communicate with objects and Web pages. You can use this to give a thumbnail view of your image, and click it to give the image as its full size, or you may, for example, make a button to link to Web page. Both examples, given in the code I used, and its effects, are given below. It is best to use your own images, so replace mine with yours. You will also learn two more attributes for IMG: WIDTH and HEIGHT:




Me!            Home

Here are the codes:\
Thumbnail
Link by Image

 Adding sound is very easy and fun. The formats supported include .wav, .mid, .mp3, and .au. Use .wav (Wave) for small file: slow loading, excellent quality, and takes up space. Use .mid (MIDI) for music without lyrics, using solely instruments. .au (Audio) is similiar to a wave file, and .mp3 (MPEG 3) is small and excellent quality, and not too bad at loading. This code will play the file you specify upon the loading of the page:

<bgsound src="soundfile" width="0" height="0">

Share this

Related Posts

Previous
Next Post »