setting image in html code example
Example 1: how to add image in html
The <img> tag will help you add image in html coding... it contains attributes:
1) src - usage <img src="">, it states the source of the image..
2) alt - usage <img src="" alt=""> it is the alternative text if you image failed to load...
Thank you and HAPPY CODING.
Feel free to give a upvote.. ^^
Example 2: html img size
<p><img src="image/example.jpg" alt="Example1" width="193" height="130"> (width:193px, height:130px)</p>
<p><img src="image/example.jpg" alt="Example2" width="96" height="65"> (width:96px, height:65px)</p>
<p><img src="image/example.jpg" alt="Example3" width="100%" height="130"> (width:100%, height:130px)</p>
Example 3: resize image html
<!--
Resize image using html
When we add any image in 'src' attribute of 'img' tag then image appears with original size on webpage
and if we want to resize the image we have to add extra attribute i.e. height and width to img tag to resize the image
-->
Simple img tag
<img src="image_path" alt="Image Sample">
With height and width attribute
<img src="image_path" width="200" height="40" alt="Image Sample">
<!--
I hope it will help you.
Namaste
Stay Home Stay Safe
-->
Example 4: how to add image in html
<img src="logo.png" />