To be able to use an image in our WEB page, we need to use <img> tag. We don’t need to close <img> tag. With src="" (source), we define the location of the image we want to show.
<img src="logo.jpg">
If you want to determine the width and height of the image you need to use width="" and height="" attributes. If you don’t use these attributes, HTML gets original image height and width as a default. If you don’t use just one of these two, HTML automatically resize image based on you defined width or height.
For example: suppose that we have image logo.jpg with 200*200 dimension.
<img src="logo.jpg"> here width is 200 and height is 200 because we don’t define them
<img src="logo.jpg" width="100"> here height is 100 because we define width 100 and automatically HTML resize the image view.
You can use border="" attribute to determine image border.
<img src="logo.jpg" border="5"
When you move your mouse over image, if you want to see the comment of image you need to use alt="" attribute and also I suggest to use it for every image.
<img src="logo.jpg" alt="This is my logo">






