asp.net.ph

Skip Navigation Links

IMG Element | IMG Object

Language References


Embeds an image or a video clip in the document.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

Remarks

The IMG element is used to render images on a page. The IMG src attribute indicates the source file of the image to display.

An image can be embedded within an A ( anchor ) element, which links the image to a target destination.

The lowsrc attribute lets authors optionally specify a lower resolution image with a smaller file size, to provide an image that loads more quickly than the source image. The lowsrc image displays first, while the real image loads.

The height and width attributes indicate the size of the image, and must always be specified. Browsers use these dimensions to fix the position of the image on the page, and continue to load text and other elements without having to wait for the image to load.

The usemap attribute allows an image to be set as an image map, with multiple clickable areas that each link to different URLS.

The current standard types of image formats applicable for the Web are:

  • GIF ( Graphics Interchange Format )
  • JPEG ( Joint Photographic Experts Group )
  • PNG ( Portable Network Graphics )

Members

IMG Members

Example

<center>
   <img src="imgs/sample.gif" width=200 height=200 border=0 alt="Somewhere on Earth">
</center>

Somewhere on Earth

See Also

AREA   INPUT type=image   MAP



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note