GRAPHICS

Graphics:

HTML allows placing of static or animated images in the HTML page. It accepts tow picture file formats .gif and .jpg. Using tools such as Gif Constructor or Adobe Photoshop, images can be created to suit the requirements of a web page and saved in these file formats. In HTML, images are defined with the <img> tag.
The <img> tag is empty, which means that it contains attributes only, and has no closing tag.To display an image on a page, you need to use the src attribute. Src stands for "source". The value of the src attribute is the URL of the image you want to display.

Syntax:

<img src="url" alt="some_text">

The <IMG> tag takes the following attributes:

 

 

 

Align

 

Controls alignment of the text following the image:
ALIGN = TOP indicates the text after the image to be written at the top, next the image
ALIGN = MIDDLE indicates the text after the image to be written at the
middle,next the image
ALIGN = BOTTOM indicates the text after the image to be written at the Bottom ,next the image
Controls alignment of the text following the image:
AIGN = LEFT indicates the image is aligned to the left with respect to the screen
AIGN = CENTER indicates the image is aligned to the center with respect to the screen
AIGN = RIGHT indicates the image is aligned to the right with respect to the screen

Border

Specifies the size of the border to the place around the image

Width

Specifies the width of the image in pixels

Height

Specifies the height of the image in pixels

Hspace

Indicates the amount of the space to the left and right of the image

Vspace

Indicates the amount of the space to the top and bottom of the image

Alt

Indicates the text to be displayed incase the Browser is unable to display the image specified in the SRC attribute

SRC

Specifies the location and name of the image file

Example:

<html>
<body>
<p>
An image:
<img src="smiley.gif" alt="Smiley face" width="42" height="42"></p>
<p> A moving image:
<img src="hackanm.gif" alt="Computer man" width="48" height="48"></p>
<p>
Note that the syntax of inserting a moving image is no different from a non-moving image.
</p>
</body>
</html>

Output :

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HYPER TEXT MARKUP LANGUAGE by DEEPA & SURIYA