IMAGE TAG IN HTML WITH ATTRIBUTES
<IMG> tag
is used to insert an image within a webpage. It uses following
attributes :
- src : It is used to specify the path of an image file. The popular extensions of image file are png, jpg and gif.
- height : Specifies height of the image in pixels.
- width : Specifies width of the image in pixels.
- alt : It is referred as alternate text. It specifies the description of the image.
Note :
Image Tag is a Empty Tag used to insert a image in web page but it will not
work without src attribute . src attribute to specify path of image. Other attributes
are optional .
Syntax
of Img Tag:
<IMG
src="launchpad.jpg" height="500" width="500"
alt="image">
<html> <head> <title>web page</title> </head> <body> <h1>Image tag in
html</h1> <img src="launchpad.png"
height="400" height="400" alt="image"> </html> |
0 Comments
Please do not enter any spam links in the comment box