How to display an image using IMG tag

   All Help Topics   

How to display an image using IMG tag

You should use the HTML tag "IMG" to display images in web pages.


<img src="" alt="Some text related to the image" style="padding:5px" align="left" >

The above html will display the image specified in the "src" attribute.

You can optionally specify the text title using the "alt" attribute, which will be shown when a user move the mouse over the displayed image.

The "padding" attribute within the "style" specifies that there should some 5 pixel gap between image and the next element like text in the page.

"align" attribute specifies whether the image has to be aligned left, center or right.

Tips & rules

1. In the "src" attribute, do not link to images in other sites. Such linking is called "hard linking". In most cases, it is illegal to do hard linking. In some cases, other sites allow you to do hard linking, but that is a trick. After few years, they will either delete those images or convert those images to advertisements which will mess up our site.

If you are using an image in our site, make sure the image is attached in our site. You should link to images in our site and not any other sites.

2. Do not specify width and height attributes for an image. Instead, resize the image before you upload.

   All Help Topics   

Point to Point!

Top Contributors
    Last 7 Daysmore...

    Latest Articles

    Managing the Toughest Times in Life: Two Inspiring Stories
    More often than not, we face a number of troubles in life. Sometimes, these pressures are daunting and we wonder how we managed such situations. Yet, it is always wise to learn from the successful experiences of some people. Two such real-world case-studies are discussed, without any reference to any person, to protect identities. Some common lessons are discussed in the article.

    Investing for the long term: 5 essential tips
    There are some simple steps for long-term investments. At least as of date, such investments are totally tax-free. We should understand the basics of such investments.

    Tamil Nadu's Economic Springboard: The Rise of New Growth Corridors
    Any activity that leads to all round development of some kind and also has economic implications can be called a Spring Field of Economic Activity. Tamil Nadu has a number of such Spring Fields making it the second largest economy of India. This article is an attempt to throw some light on how these Spring Fields of Economic Activity have happened in Tamil Nadu.