HTML EXAMPLE · WORKING REFERENCE

Display an Image

img element me src aur meaningful alt text use karke image display karo.

Working code

<img
  src="https://via.placeholder.com/220x120"
  alt="Example placeholder image"
  width="220"
  height="120"
>
Run Code ▶

Preview

220 × 120 image

How it works

src image location batata hai.

alt meaningful text alternative deta hai. Width aur height layout space reserve karne me help karte hain.

Try Yourself

<img
  src="https://via.placeholder.com/300x160"
  alt="Practice placeholder image"
  width="300"
  height="160"
>

Learn this concept

Read related HTML Tutorial →