HTML IMAGES 9

images 9

A web page can be attractive and beautiful. HTML allows addition of both static and animated graphics. The tag used for this purpose is <img>. This tag does not need an eng tag. There are many types of images which can be used in web pages. But the two popular types are: “.gif” (Graphic Interchange Format), “.jpg” and “.jpeg” (Joint Photographic Expert Group).

Some important attributes of <img> tag are as follows:

IMAGE TAG ATTRIBUTES DISCRIPTION
SRC It specifies the name of image to be displayed if the image is stored in same directory. But if the image is stored in some other directory than a complete path must be defined in this attribute.
WIDTH It specifies the width of image in pixels.
HEIGHT It specifies the height of image in pixels.
VSPACE It specifies the amount of space to image from top or bottom in pixels.
HSPACE It specifies the amount of space to image from left or right in pixels.
ALIGN It is used to align the image on screen. It has three values: left, right and center.
ALIGN It is also used to align the text with respect of image on screen. It has three values: top, bottom and middle.
BORDER It specifies the size of border around the image.

 

HTML Images:

In this example, the width, height and border are specified in attribute values. Moreover, the space to the image from top, bottom, right and left is also specified in the attributes.

EXAMPLE8.1:

<html>

 

<head>

<title>Website-School/HTML Image Example 1</title>

</head>

 

<body>

<img src=”/logo.gif” alt=”8e1images(e1)” width=”500″ height=”507″ hspace=”10″ vspace=”10″ border=”2″ /><p>This image has width=500, height=507, hspace=10, vspace=10 and border=2</p>

</body>

 

</html>


For more visit next posts in this category.To go back to Contents of this tutorial: Contents of HTML Tutorial

email

2 Responses to HTML IMAGES 9

  1. Could I possibly post this to one of my websites on this topic? I’d link back to the original, of course. Email me what you think. :)

  2. Do you mind repost this to one of my sites on this subject? I’d link back to the original, of course. Let me know by email what you think. :)

Leave a Reply