Images are very important to display your web page beautify. Following simple step to use image in your web page.
Image Syntax:-
<img src=" Image URL " ....... Attributes />
How to fine image URL:-
- Right click in image you want.
- Click properties.
- Click security and copy the object name.
- After paste image URL change Back slash (\) to Forward slash (/)
Insert image in your web page used <img> tag.
Write a program to display a image.
<html>
<body>
<h1>Display Image in web page</h1>
<img src="D:/HTML/Logo.png" alt="Logo" width="500" height="500"/>
</body>
</html>
Output:-
Image set left:-
image left by default display.
orUse in attribute style.
image display in left
<img src="D:/HTML/Logo.png" alt="Logo" style=float:left; width="300" height="300"/>

Image set Center:-
image display in center.
<center><img src="D:/HTML/Logo.png" alt="Logo" width="300" height="300"/></center>

Image set Right:-
image display in right.
<img src="D:/HTML/Logo.png" alt="Logo" style=float:right; width="300" height="300"/>

Image very common or important to design a web page . Image use to link as well as information show.
<img src=" Image URL " ....... Attributes />
Attributes like:-
alt - alternate text for the image
Style of images
width or height etc.
0 Comments
Post a Comment
Please do not enter any spam in the comment box.