Articles → HTML → img tag in HTML

img tag in HTML






Syntax


<img src="" alt="" />









Sample


<html>
  <head>
    <title>Image Demo</title>
  </head>
  <body>
    <img
      src="http://www.gyansangrah.com/ArticleImages/anchor_tag_html_one.jpg"
      alt="Sample tooltip"
    />
  </body>
</html>





Click to Enlarge




Click to Enlarge


Setting up the width and height of the image






<html>
  <head>
    <title>Image Demo</title>
  </head>
  <body>
    <img
      src="http://www.gyansangrah.com/ArticleImages/anchor_tag_html_one.jpg"
      alt="Sample tooltip"
      width="200"
      height="200"
    />
  </body>
</html>







Click to Enlarge




Browser support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Saturday, January 2, 2016
 
Updated On  -  Monday, June 5, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250