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.
⏰Time is Gold.
No comments:
Post a Comment