Images In HTML

Images in HTML can be inserted using <img> tag. Each image to be inserted must be present on the server. The url of image on server is added to <img src=”IMAGE_URL”> to fetch the image


The alt tag defines a text which is displayed to users in case of poor network connectivity. Since there are cases that image could not be fetched on client side, so a text is displayed at the image position

Image height and width can be adjusted as given in code.

<!DOCTYPE html>

<p>This is a Hyperlink from image <a href="" target="_blank">
<img src="" width="100px" height="100px" alt=" logo"></a></p>

<p>This a large image
<img src="" width="200px" height="200px" alt=" logo"></p>

<p>This a image with style parameters
<img src="" style="width:200px;height:200px;" alt=" logo"></p>


output is as follows

Related Tutorials