Bringing Images

  1. Images on your document
  2. The alt Attribute
  3. Useful Tips

Images on your document

The < img> tag, defines images in HTML.

The < img> tag is an empty one, which means that it contains attributes only and may be closed on itself.

The src attribute, which stands for "source", specify the image location.

The value of the src attribute is the URL of the image to be displayed.

The syntax of defining an image:

        <img src="url">

The alt Attribute

The alt attribute is used to define an "alternate text" for an image.

The value of the alt attribute is an author-defined text:

        <img src="riodejaneiro.gif" alt="Wonderful City">

The "alt" attribute tells the reader what he or she is missing on a page if the browser can't load images.

The browser will then display the alternate text instead of the image.

Include the "alt" attribute for each image on a page, is a good practice

It will improve the display, usefulness and accessibility of the page.

Useful Tips

Loading images take time, if an HTML file contains ten images, eleven files will be
transferred by the net, to display the page right.

So, use images carefully.