[HTML]Image Tag: All You Need To Know

 

Info! This article gives you a full information about the image tag.

 

“Chinese proverb. One picture is worth ten thousand words.”

(You may skip this part)

Hmm.. How would a webpage look like without images? Bizarre. Maybe it would load faster but, strange.

Ohk. So without wasting your time and coming to the point, Images are really important. doubtlessly, images enhance the appearance of a webpage.

The Code

(Not to be skipped. You are here only for this.)

<img src="#" alt="alternate"></img>

 

Code Explanation

  • src? The URL the image will be placed where the hash “#” is placed in the code above.
  • alt is used to display alternate text. Alternate text will be displayed only when the image fails to display itself by any chance.
  • </img> is the closing tag. You can either use it or not. It totally depends on you.

PS

Don’t forget to use our Try-it Editor. You are done for now.