The <img> Tag

By Tony 2023.2.19


Almost every webpage has images on it. Images give users a visual understanding for a thing. This article will tell you how to put images on your webpage.

An image

This is an image tag's code:

<img src="example.png" alt="Image">
Note: <img> tag doesn't have a closing tag.

In this line of code:

The list above shows 4 most important elements of an <img> tag. You can also style it, give it an id or a class, or give it a title by adding other attributes.