HTML Images


Images are the most common form of multimedia using to create attractive web pages.  HTML Images are defined with <img> tag. 

Important Attributes of the <img> element

  1. src
    This attribute define where the image loads by browser. When defining the path of the image you can specify it as a relative or absolute way.
    Ex:I have a image folder in the root directory of my site & use myHome.jpg image can be this way
    * Absolute path
    <img src = "http://programmingforbeginers.blogspot.com/image/myHome.jpg" />
    * Relative Path
    <img src = "image/myHome.jpg" />
  2. width & height
    width & height attributes define the size of the image. If excluded these attributes browser 
    will tend to load the image as its original size.

  3. alter
    This attribute uses to define the alternative description of image which is unable to load view.
Ex: <img src = "image/myHome.jpg" height = "100" width = "150" alt = "My Home image"/>

1 comment:

  1. Thanks for your grateful informations, am working in FNT software solutions, so it will be helpful info for my works.

    ReplyDelete