Home About Us Blog Contact Us
Call Now Mail Chat Now
How to insert an image in html

How to insert an image in html

Are you a beginner?, trying to insert an image in your HTML code, so don’t worry you are at the right place.

Before starting always keep in mind we have to use HTML <img> tag to insert image in any HTML code. In this tag we have to define the image path with src=”image.jpg” attribute.

<img src="image.jpg" alt="image" />

An image makes a web page more impressive that’s why we use tag to place an image on a web page. If you’re not more familiar with html so you should know how to add link on image in html.

If you are still in trouble how to insert an image in html so follow some steps.

How to write html image code

Step: 1 Create a directory

Create a new directory or folder in your system where you are writing html document. Now give a name to that directory or folder like images. Identify first your image directory path if you give the wrong path image will not show on your web page. Find your image directory location in your system’s address bar.

insert an image in html

Step: 2 Add full path of your image

Add your image path to your html document where you to show the image. After adding your directory path now write your image name with an extension like jpg, jpeg or png.

<img src="/images/apple.jpg" alt="apple" />

Step: 3 Check the path and save

Verify your image path is correct then save your html document and run it into the browser.

Get In Touch

Don't Hesitate to Contact Us