Sunday, 15 March 2015

HTML Images

HTML Images Syntax

In HTML, images are defined with the <img> tag.
The <img> tag is empty, it contains attributes only, and does not have a closing tag.
The src attribute defines the url (web address) of the image:

<img src="url" alt="some_text">
 

The alt Attribute

The alt attribute specifies an alternate text for the image, if it cannot be displayed.
The value of the alt attribute should describe the image in words:

Image Size - Width and Height

You can use the style attribute to specify the width and height of an image.

 

No comments:

Post a Comment