top of page

How to use image tag? <img>

  • ​Choose an image from your file

  • Save in the project folder together with your html project

  • Go back to Visual studio code add code

  • Example: 

       <img src="cake png..jpeg" > 

  • Remember have image file name : png ,jpeg...

actural image.png

How to resize image?

  • We need CSS style coding for resizing image

  • The coding will be:

  • <img src="cake png..jpeg" alt="cake" width="300" height="'400">

  • Set the values: width pixels and height pixels

resize image.png

How to make a border around the image?

  • Example: image size is 300pixel by 400pixel 

  • Border side is 10 pixel

  • The coding is :

       <img src="cake png..jpeg" alt="cake" width="300" height="400" border="10" >

Screenshot 2025-12-02 at 8.19.24 AM.png

Remember to save the file every time you change any thing in your website and reload the browser, otherwise you cannot review what you change!!!

bottom of page