In HTML, images are defines with the tag. The img tag is empty, which means that it contains attributes only and it has no closing tag. To display an image on a page, we need to use the src attribute. src stands for “source”. The value of the src attribute is the URL of the image we want to display on our page.

Home Page - Basic Engineer
Blog Header


<img> src = “url” />

<img> Tag Syntaxes

  1. <body background=”URL”> . . . . </body>
    • Sets the background of the page to use the given image.
  2. <img src=”URL” | “name” height=”n” width=”n” [alt=”string’] [align=”top”|”center”|”bottom” ] [usemap=”URL”]>.
    • Displays an inline image i.e., an image appears in the body of the text.
  3. <a href = “URL” >text message </a>
    • Uses an ordinary hypertext link and URL should point the image file.
  4. <a href = “URL”><img src = “filename”></a>
    • Uses an image for hyper link.
  5. <img src = “URL” usemap = “URL”>
    • To display the source image and to map the second URL. Web Technologies.
  6. <area shape = “circle” | “rect” | “poly” | “default” href = “URL” cords= “string” alt= “string”>
    • Creates a clickable area on an image map. The attribute “alt=”string” indicates for the reader of where the link goes.


<h1>An image:<h1>
<img src="" width="300" 
height="300" />
html images tag example
images tag example
  • Each shape is defines by co-ordinates pairs of the integers which give location of the image in pixels.
  • The default location does not require coordinates is used to indicate what happens if the user clicks outside of the mapped areas. Each image map can have only one default.
  • A rectangle has four coordinates which are pair . The first pair defines the top left corner and second pair is the bottom right corner of the area.
  • A circle is define by its center and its radius. The center is given by a pair of values , the radius by a single value. Therefore this requires just three values in the coordinate string.
  • A polygon is made from a set of coordinates with the last pair list being join to the first to complete the shape.

Background Images

The following example demonstrates how to add a background image to an HTML page.


<body background="">
<font color=”black”>
<h1>A background image</h1>
background images example
background images example

Alt attribute

The alt attribute is use to define an alternate text for an image. The alt attribute tells the reader what he or she is missing on a page if the browser can’t load images. The browser will then display the alternate text instead of the image.


<img src="" alt=”ganesha”>

<Video> tag

This tag is use to play video on webpage is knows as Video tag


  • Src.
  • Height.
  • Width.
  • Controls.
  • Muted.
  • Autoplay.
  • Loop


<title>video player</title>
<video autoplay="true" controls="" autoplay="">
<source src="kota.mp4" tpye="video.mp4">
video tag example
video tag example

If you have any queries regarding this article or if I have missed something on this topic, please feel free to add in the comment down below for the audience. See you guys in another article.

To know more about HTML order list please check Wikipedia link click here.

Stay Connected Stay Safe. Thank you

Basic Engineer

Hey Readers! We have more than fifteen years of experience in Software Development, IoT, Telecom, Banking, Finance and Embedded domain. Currently we are actively working on Data Science, ML and AI with multiple market leaders worldwide. Happy Reading. Cheers!


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *