What is a Web Page Image
Chapter - 5 : Images in Web Page: (Page 1/4)
5.1- Inserting Images in Web Page:
Theoretically various image formats can be used in web page. But the most commonly used are 'gif' , 'png' , 'bmp' and 'jpg'. The images tag starts with, '<img' and ends with '/>'. The 'img' tag does not have a separate end tag. You can use insert a picture in your web page by following command.
<img src='images/name.gif' />
Where name.gif is name of image file, placed in images folder. You can display images kept in any folder by defining the correct and complete address. In this case the image will be displayed in its original size.
5.2- Alt Attribute:
If by any chance the image is not loaded, because of the browser limitation or any other reason, then on screen you will
find a blank space with a 'X' mark (FIG- 5.1). To give some inform to your visitor regarding the image, use 'Alt' attribute.
<img src='images/name.gif' alt='Description' />
In 'Alt' attribute, the short description of image is given. If image is not displayed, then viewer will at least see the 'alt' description (FIG- 5.2).
To be on safer side, it is advisable to use 'alt' tag in the image command
5.3- Image Size:
By the above command the image will be displayed in its' actual size. However, you may resize the image (enlarge or reduce) by the width and height command.
Command: <img src='images/name.gif' width='120' height='100' alt='name image' />
Output: Fig - 5-3
(Cont......... to next page (Pg-2))
©
funandhobby.com (What is a Web Page Image)