Professional Documents
Culture Documents
II
Unit
KEYWORD
S
Image
BORDER
Attribute
HEIGHT
Values
URL
Description
SOURCE- Location of
the image
Unit
Unit
The Program Output of the HTML Program 1 is shown below. The image file box.gif
has been exported and displayed on the center of the webpage together with the displayed
caption Sample output of Exported picture.
Program Output 1
Note:
Make sure that the html file and image file are both saved on the
tag.
Unit
Sizing Image
To size an image, use the HEIGHT and WIDTH attributes to stretch or shrink an
image to fit into the allotted space, in case the image does not exactly fit tonthe
attribute number. The mentioned attribute lets the browser set aside the
appropriate space in image.
Attributes
Values
Description
BORDER
#pixels
BORDER Modifies
the thickness of the
border.
HEIGHT
#pixels
WIDTH
#pixels
#pixels
VERTICAL SPACE it
adds vertical space in
pixels
VSPACE
HSPACE
#pixels
HORIZONTAL SPACE
it adds horizontal
space in pixels
Unit
Unit
The following is the Program Output of the HTML Program 2 showing the effect of the
attributes used in the program. You can noticed the resized image in the webpage.
Program Output 2
Unit
Unit
Unit
Unit
The following HTML program shows how to create link using an image. In this program,
we uses a link of a bitmap image. Once the image is clicked, it connects to the linked webpage.
HTML Program 4
Unit
Below is the Program Output of the HTML Program 4 showing an image used as a
hyperlink.
Program Output 4
Unit
KEYPOINTS
Images are best used as a navigational tool in the web. Linking a web page with the
use of an Image makes surfing interactive and fun.
Usually images are the first elements noticed by the website visitors.
Therefore, adding images to your website is essential. In adding Image to
your webpage, you can use the element <img src=> within the space
where you type the image location or path.
HANDS-ON ACTIVITY: