How To Add Images To Your HTML Projects

How To Add Images To Your HTML Projects

Adding Images To HTML

Why Is Adding Images Important?

Adding images to your webpage improves the design and appearance of your webpage. Images relay better information to web users.

How to Add Images

The Html <img /> tag is used to insert an image into a webpage.

Images are not technologically inserted into web pages, images are linked to web pages.

  • The <img /> tag creates a holding space for the image used.
  • The <img /> tag is empty, it contains attributes only and does not have a closing tag.
  • The <img /> tag has two required features which are src Source File and alt alternative text
  • The adding image syntax is:
< img src="url" alt="alternate text" />

You might be thinking of what is alternate text. The alternative is just the word that appears in the position of the img, either before the image appears or when the network is bad, the alternative text will describe the image.

Also editing the Image size -The Height and the width. I make use of the style attribute to choose the desired width and height of an image.

The Syntax

<img src="url" alt="alternate text" width="400" height="500" />

Conclusion

If you are having any trouble adding images to your webpage, feel free to message me directly, I will be here to receive you.