Image Adding

] ] ] ] ] ] ] ]

Pros and cons of using images in HTML documents.

PROS

CONS

  1. Images can be a good way to break up large amounts of text.
  2. Images can draw attention.
  3. Images used repeatedly load faster each time they are accessed.
  1. Images take longer time to download than text does.
  2. Some users without a graphical web browser cannot view images.
  3. Most browsers don’t support an unlimited number of colors while most images you may want to add use color.

There are a lot of image file format used currently. Among these, GIF (Graphics Interchange Format) and JPEG (Joint Photographic Experts Group) are widely used. The extension of GIF is ".gif" whereas the extension of JPEG are ".jpg" or ".jpeg."

Some interesting differences between GIF and JPEG.

GIF

JPEG

  1. GIF has a maximum of only 256 colors.
  2. GIF is slower to download but faster to view.
  3. GIF is good for line art graphics or the like.
  1. JPEG has up to 16.7 million colors.
  2. JPEG is faster to download but slower to view.
  3. JPEG is good for photographs or scanned images or the like.

 

Image = <IMG>

To put an image on your home page, this tag will be used.

Source

To indicate the filename of the image you want to put on your web page, use <IMG SRC="filename">.

 

Alignment

To indicate the alignment of the text on the line with relation to the image, use <IMG ALIGN=options>. The options can be TOP, MIDDLE or BOTTOM.

 

Height

To control the initial height of the image, use <IMG HEIGHT=number in pixels>.

 

Width

To control the initial width of the image, use <IMG WIDTH=number in pixels>.

 

Alternative

To serve users using browsers without graphical support by providing them a text string instead, use <IMG ALT="text">.

 

Previous | HTML Page | Next