Tuesday, 6 December 2016

HTML Images

  1. You can insert any image in your web page by using <img> tag.
  2. The simple syntax to use this tag is <img src="Image URL" ... attributes-list/>
  3. The src attribute is used to give the address of the image with extension.
  4. The alt attribute is a mandatory attribute which specifies an alternate text for an image, if the image cannot be displayed.
  5. You can set image width and height based on your requirement using width and height attributes.
  6. By default image will have a border around it, you can specify border thickness in terms of pixels/value using border attribute. A thickness of 0 means, no border around the picture.
  7. By default image will align at the left side of the page, but you can use align attribute to set it in the center or right.

No comments:

Post a Comment