Skip to content

7. Embedding Images in Webpage

Deepak Kumar edited this page Jul 28, 2020 · 1 revision

We can use image tag to embed images.

For example,

We can also give it a fixed width and height by using the “width” and “height” attributes.

The “src” attribute:

We add the source attribute to give the location of the image. The image can be either online or offline.

The “alt” attribute:

This is an alternate text for image. It has two main purpose. First, if the image could not be loaded for any reason, it shows this text to your website users.Second, this attribute helps search engines index the image.

Clone this wiki locally