To insert image box in your web page you can use HTML tag<img>. This tag has following attributes:
src - URL (path) to your image file.
alt - alternate text for the image.
etc.
Few examples of usage:
We want to insert an image image.png to the web page page.html
<img src="image.png" alt="This isimage" /> - image.png is in the same folder as page.html.
<img src="img/image.png" alt="This isimage" /> - img folder is in the same folder as page.html, image.png is
in the img folder.
<img src="https://example.com/img/image.png"alt="This is image" /> - image.png is accessible via URL https://example.com/img/image.png.
<img src="../img/image.png" alt="This isimage" /> - you can use relative path to image.png.
Comments
Leave a comment