Images can improve the design and the appearance of a web page.
<img src="pic_trulli.jpg" alt="Italian Trulli">
HTML Images Syntax
In HTML, images are defined with the
<img> tag is empty, it contains attributes only, and does not have a closing tag.
src attribute specifies the URL (web address) of the image:
The alt Attribute
alt attribute provides an alternate text for an image, if the user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).
The value of the
alt attribute should describe the image.
If a browser cannot find an image, it will display the value of the alt attribute.
<img src="img_chania.jpg" alt="Flowers in Chania">