HTML image Tag

HTML img Tag is used to embed or insert images in a webpage, website or html document. HTML img tag is one of the most used html tags.

Syntax of HTML image Tag

The Syntax of HTML image Tag is shown below, It has only starting tag.

<img src="car.jpg" alt="Black Car" width="500" height="600">

Usage of HTML image Tag

HTML image Tag is used to embed, insert or link an image with html document.

Always define the width of the image for responsive web pages.

The width attribute or CSS can be used to set the width of an image.

HTML image Tag is an inline element.

Example of HTML image Tag

Simple example of HTML image Tag is shown below.

<img src="cat.jpg" alt="Cat" width="500" height="600">

In above example an img tag is used to embed the image of a cat.

The src attribute is used to define the path of the image.

The alt attribute is used to define the image and is also important for the search engine optimization. The term alt stands for alternate and the alt text is displayed if image link is broken.

Browser Support for HTML image Tag

HTML image Tag is supported by all major browsers including Safari and Internet Explorer.

Global Attributes Support in HTML image Tag

The HTML image Tag supports all Global Attributes.

Event Attributes Support in HTML image Tag

The HTML image Tag supports all Event Attributes.

HTML image Tag Video

Watch our video on HTML image Tag.

HTML Comment Tag HTML Doctype Tag HTML anchor Tag HTML abbr Tag HTML acronym Tag HTML address Tag HTML applet Tag HTML area Tag HTML article Tag HTML aside Tag HTML audio Tag HTML b Tag HTML base Tag HTML basefont Tag HTML bdi Tag HTML bdo Tag HTML big Tag HTML blockquote Tag HTML body Tag HTML br Tag HTML Button Tag HTML Canvas Tag HTML Caption Tag HTML Center Tag HTML Cite Tag HTML Code Tag HTML Col Tag HTML colgroup Tag HTML data Tag HTML datalist Tag HTML dd Tag HTML del Tag HTML details Tag HTML dfn Tag HTML dialog Tag HTML dir Tag HTML div Tag HTML dl Tag HTML dt Tag HTML em Tag HTML embed Tag HTML fieldset Tag HTML figcaption Tag HTML figure Tag HTML font Tag HTML footer Tag HTML form Tag HTML frame Tag HTML frameset Tag HTML Heading Tags HTML head Tag HTML header Tag HTML hr Tag HTML html Tag HTML i Tag HTML iframe Tag HTML img Tag HTML input Tag HTML ins Tag HTML kbd Tag HTML label Tag HTML legend Tag HTML li Tag HTML link Tag