About html image :
html image is a great thing for your website. But you can not set a image without following the rule of setting image. Necessary images make a website beautiful and color full . html image tag will help you for make a great website.
Use of html image:
In html or web page a image is indicate by <img> tag. This <img> is a single tag. It has no closing tag. If you want to display any image on web page you must use src attribute. Src means source. Example: <img src=”link of image”>
Alt html image attribute:
alt attribute says the alternative text about any image. If image can’t display on browser , the alt text will be display then. Example: <img src=”link of image” alt=”your _ text here”>
Set height and width of your image:
The height and width attributes are used for indicate height and width of your image. Example: <img src=”link of image” alt=”your _ text here” width=”304″ height=”228″> The browser always catch the number of height and width in pixel.
Align html image:
you can set your image on middle, top, bottom by align attribute.
A full example : The following picture has been captured from my pc. Here you can see a jpeg image named h2cweb1 .
I want to show this picture on my browser. I have to save a html doc on same directory. If I don’t do this I have to find link of image and than put it after src attribute. If you don’t know how to make a html doc you have to read Html Web Pages And Attributes and Html Step By Step article.
<img src=”h2cweb12.jpg” alt=”logo for h2cweb.net”>
output will be ,
In the following picture I have shown the directory of my pc.