NEW

6/recent/ticker-posts

Header Ads Widget

HTML Image

 

HTML Image

HTML img tag is used to display image on the web page. HTML img tag is an empty tag that contains attributes only, closing tags are not used in HTML image element.

Let's see an example of HTML image.

  1. <h2>HTML Image Example</h2>  
  2. <img src="good_morning.jpg" alt="Good Morning Friends"/>  

Output:

Good Morning Friends

Attributes of HTML img tag

The src and alt are important attributes of HTML img tag. All attributes of HTML image tag are given below.

HTML Image

HTML img tag is used to display image on the web page. HTML img tag is an empty tag that contains attributes only, closing tags are not used in HTML image element.

Let's see an example of HTML image.

  1. <h2>HTML Image Example</h2>  
  2. <img src="good_morning.jpg" alt="Good Morning Friends"/>  


Output:

Good Morning Friends


Attributes of HTML img tag

The src and alt are important attributes of HTML img tag. All attributes of HTML image tag are given below.

Example:

  1. <a href="https://www.javatpoint.com/what-is-robotics"><img src="robot.jpg" height="100" width="100"></a>  

Output:

HTML Image


Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<img>YesYesYesYesYes


Post a Comment

0 Comments

Recents Post

Exploring Paidwork - Your Gateway to Earning Online