- Images on your document
- 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:
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.
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.