18.10.17

FORMAT

The image tag has two attributes.

  • The src suggests us to give the image file name.If the desired image is not present in the current directory of web page then the complete path where the image is located must be given.
  • The alt attribute displays the text when it is not possible to display the image.For instance-in above given imagedemo.html script if,the lamp1.jpg is not present.There are two types of images that are more commonly used- 
  • Graphic Interchange Format(GIF).It uses 8-bit color representation for pixels.Hence a single pixel can have 256 different colors.this file have the extension.gif.
  • Joint Photographic Expert group(JPEG).This format uses 24 bit color representation for pixel.Hence a JPEG can have 16 million different colors.The file have the extension .jpg or .jpeg.
       The JPEG image have more color information than a GIF image.Secondly JPEG can be smaller than GIF image.Hence normally JPEG image is preffered.But the drawback of JPEG is that it does not support transperency. 





⏰Time is Gold.

No comments:

Post a Comment

Featured Post