Introduction to Web Graphics Title(35161 bytes)

The <IMG> tag allows you to insert images into your web page, it has no closing tag. 

The above banner text image was inserted using the tag:

<img  src="images/IntroWebGraphics.png"  alt="Introduction to Web Graphics Title" width="382" height="50 >

Attribute

Explanation

SRC The only REQUIRED attribute, specifies the location of the image file, in this case using a relative address the folder images under current folder, where the image is named:  IntroWebGraphics.png
ALT Designates a string to be displayed in text-only browsers, or browsers which have  been set to disable image loading temporarily.    This string will also be displayed before the image is loaded  in browsers that do support loading graphics.  In this example the text will be:   Introduction to Web Graphics Title

This tag should always be included, and will be discussed later in the context of accessibility issues.

WIDTH Specifies the width of an image in pixels, in this case: 382.

Using these tags is strongly encouraged because they speed up page loading.  They save client software the time it takes to calculate the image dimensions.  This allows the browsers to load the text first then come back and inset the image without rearranging any of the rest of the page.

How do you find out an images height and width? 

HEIGHT Specifies the height of an image in pixels, in this case:  50

Using these tags is strongly encouraged because they speed up page loading.  They save client software the time it takes to calculate the image dimensions.  This allows the browsers to load the text first then come back and inset the image without rearranging any of the rest of the page.
How do you find out an images height and width? 

 

    

Last updated on  09/14/2004  by L.M. Hicks