Images in HTML | HTML Assignment Help
The web page can be decorated with an image; such an image can be employed in a web page using an < img> tag
Its Syntax is
< img src= “ URL “ attributes />
This img tag has no ending tag, it has only attributes list
Rules
PNG, Gif and JPEG images can be employed
Denote file name correctly in the attribute src
Name of an image is case sensitive
The attribute alt specifies an alternative text in case of not displaying an image which is mandatory
Location of an Image
The image location or a path should be specified exactly to retrieve an image
Specifying Width and Height of an Image
The image height and width can be specified through width and height attributes of an image either in a percentage or pixels
Specifying an Image Border
The image border thickness can also be specified in terms of pixels. The border thickness 0 represents no border for an image
Specifying Image Alignment
Alignment for an image can be specified by using an attribute align. Default one is left
Example

Output
