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">
Align
|
Controls alignment of the text following the image: |
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 |
<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>