Learn HTML Language

Used for creating webpages that contains texts, graphics, multimedia etc. Learn various tags, attributes that help you in web-development.

HTML Introduction
Tags Reference

HTML Images

The HTML <img> tag is used to embed an image in a web page.

Images are not technically inserted into a web page; images are linked to web pages.

The <img> tag creates a holding space for the referenced image.

The <img> tag is empty, it contains attributes only, and does not have a closing tag.

The <img> tag has two required attributes:

src - Specifies the path to the image

alt - Specifies an alternate text for the image

We can use the HTML width and height attributes or the CSS width and height properties to define the size of the image.

For example :

Run code

Share this page on :