Thursday, 19 December 2013

Lesson 4: Working With Images In HTML

Placing images in HTML Page is very easy by using <img> tag. Images can be placed on a page by giving its location address in the <img> tag by using 'src' keyword.
For example: <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxHTT92OG01cp3cDHAhqbfrpuUFo9E6u4ILBkEvFbauu_8FOpWWA-OXI762RyVPIpvojfeQBidQi6ZLQ7N4bNqHFcEoG_bQjmZjy8HpuXW5NmFToGXEt0CZOH7taO8HeRMKWLW95y7Cmw/w421-h66-no/Logo.jpg"> places the image like as follows...

Some of its more usability are:-

  • <img src="IMAGE LOCATION" width="100" height="50"> -> Gives image a specific height and width.

  • <img src="IMAGE LOCATION" border="10"> -> Gives a border to the image.

  • <img src="IMAGE LOCATION" alt="Some Image Here"> -> 'alt' tag is used to show some alternative text if image does not load because of any error or something.
    www.HomeShop24.bogspot.com
    Here I gave wrong image address to show alt tag use.
    Some browsers show the alt text and some don't show the alt text but they show a image with a cross in it.

  • <img src="IMAGE LOCATION" title="Some Text"> -> This gives a title to an image, whenever you take the mouse cursor over that image it shows the title text. Move your mouse cursor to the image...

  • <img src="IMAGE LOCATION" align="right"> -> This gives a right alignment to the image...

More HTML Tutorials <-Click Here

No comments:

Post a Comment