Pages

HTML image tag : Background image

Images are used to provide a background to your web page . They provide a theme to your web page and also appeal the visual appeal of the page . Images can also refer to other pages on the web .<img> element is used to display images .Two pieces of metadata are associated with this element i.e. where to find the image and textual description of the image .

src -source attribute specifies the location of the image . It functions similar to href .

alt -alternate text attribute . This gives short description of the image .

e.g.

        <img src="/images/abc.jpg" alt="The Shawshank Redemption" />


/images/abc.jpg is a relative link .


Web browsers show the alternate text for an image if you hover your cursor over the image .