Articles → HTML → Img Tag In HTML
Img Tag In HTML
Syntax
- Src – specifies the image source. In the src attribute, you can specify the local path as well as URI.
- Alt – Tooltip of the image
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 Explorer | Firefox | Chrome | Safari | Opera | Edge |
---|
Yes | Yes | Yes | Yes | Yes | Yes |