Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Src Attribute
Src Attribute

src attribute is used for the URL or location of image <img /> tag. The src full form is source, by using src attribute you can put hundreds or thousands of images, in your html document.

Syntax

<img src=URL />


Here URL is image location where image is placed in your PC or laptop.


Example

bird

Practice Task

Open notepad or any other text editor, follow the following points.


  • Use src attribute and put 2 images in your page
  • both images should be different or you can repeat same image two times
  • Give width of 100 and height of 100 to each image
  • Use <br /> if neccessary otherwise leave it

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

bird2 bird2

In above task same image is repeated two times.