Become Joomla Developer

Using Image

To display an image on a page, you need to use the img tag with src attribute. img stands for "Image" and Src stands for "source". The value of the src attribute is the URL of the image you want to display on your page.

Write HTML Code

1. <html>
2.     <head>
3.         <title>Page Image</title>
4.     </head>
5.     <body>
6.         <h1>My Image</h1>
7.         Welcome to my picture<br>
8.         <img src="prasat_preah_vihear.jpg" alt="I love prasat preah vihear">
9.     </body>
10. </html>

Explain

<img src="prasat_preah_vihear.jpg"> tag use to Display image in web brower and src="prasat_preah_vihear.jpg" attribute use to open prasat_preah_vihear.jpg

alt attribute use to display some text when we take mouse over on the image. And it all so show this text when it cannot found the name of image that we use.

if you want control width and hiehgt of image you can use attribute width to control width of image. And you can use height to control the height of image

Example: <img src="prasat_preah_vihear.jpg" alt="I love prasat preah vihear" width="100px" height="50px">

px it mean pixel. If you don't want use pixel you can use percent like width="100%"

Result

My Image

Welcome to my picture.
I love prasat preah vihear

Suggestion | Contact US | About US | Term of Use | Privacy Policy | Advertiseing