HTML Tutorial | Image


In HTML, <img> tag is used to present images (like jpg, png, gif etc.) on web page.

  • <img> tag is an example of One sided tag
  • Syntax: <img src="url">
  • src stands for Source.
  • url stands for Uniform Resource Locator (where our resource is located).
Example:
   <img src="http://www.pooripadhai.com/favicon1.png"> 

Alt attribute

The alt attribute specifies an alternate text for an image, if the image cannot be displayed.

  • The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user (or blind person) uses a screen reader).
  • If a browser cannot find an image, it will display the alt text.
Example:
   <img src="http://www.pooripadhai.com/favicon1.png" alt="pooripadhai logo"> 

Width and Height attribute

The width and height attribute used to re-size an image.

Example:
   <img src="http://www.pooripadhai.com/favicon1.png" alt="pooripadhai logo" width="60px" height="50px"> 
Example:
   <img src="http://www.pooripadhai.com/favicon1.png" alt="pooripadhai logo" width="20%" height="15%"> 

Video-English
Best Use:360p or more (480p or 720p)



Video-Hindi
Best Use:360p or more (480p or 720p)