In this tutorial, we will learn about HTML Images. We use an image tag to add images on the web page. To add an image in the web page we have to add an img tag and an src attribute in the img tag. In src attribute, we add the path of the image. This image path may be internal or external. Means image may be present on the same website or from some other website. Let’s check how to add image tag in HTML code.
Page Contents
Here is code which shows how you can add an image(internal image) on the web page if the image and web page both are saved at one server( in single folder e.g Desktop of your PC)
Internal Source Example: –
<img src="flower.png" height="300px" width="300px" alt="flower image"/>
External Source Example: –
Here we will check how we can add the image from an external source.
<img src="https://images-na.ssl-images-amazon.com/images/I/71K8SKRk4gL._SX425_.jpg" height="300px" width="300px" alt="flower image"/>
Output: –

Parvesh Sandila is a passionate web and Mobile app developer from Jalandhar, Punjab, who has over six years of experience. Holding a Master’s degree in Computer Applications (2017), he has also mentored over 100 students in coding. In 2019, Parvesh founded Owlbuddy.com, a platform that provides free, high-quality programming tutorials in languages like Java, Python, Kotlin, PHP, and Android. His mission is to make tech education accessible to all aspiring developers.​