Home  »  HTML   »   img

An img tag represents an image. We can display any supported image type using img tag.


represents URL of the image file.

  • URL

defines alternate text for the image, if the image for some reason cannot be displayed

  • Text

defines different sizes of the image.

  • Text defining viewport widths separated by commas. These widths will load relevant image source defined in scrset attribute.

defines multiple image sources.

  • Text with two parameters. A URL followed by either width or pixel density

HTML img Example:

Edit Example