HTML Images

The <img> tag is used to insert a picture into a document. This element should not contain any content, and does not require a closing tag.

Working

It is essential to comprehend that images are not technically "part" of the website page file, they are isolated files which are embedded into the page when it is seen by a browser.

So, a basic web page with one image is actually two records or files - the HTML file and the image file.

Image Breakdown

Here is the breakdown of HTML Image

Image Example

Below example will demonstrate the basic architecure of HTML Image

<!doctype html>  
<html>

    <head>
        <title>HTML Image</title> 
    </head>
  
    <body>
        <img src="img/logo.png" alt="HTML 5 Logo">
    </body>

</html>