| Be My Friend

Previous

Next


HTML Images - Insert Images in HTML

HTML Images | Syntax | Insert Image | Height/Weight | Image Location | Image as Link

For good looking website, images are most important.

In this tutorial, we are going to discuss how to insert images on the HTML page.

HTML Image Tag ( <img> ) is used to display image on the web page.

Using <img> tag, you can insert images into HTML pages.

And also you can use an attribute for images to looking images good. you can use jpg, png, and gif files also.

The HTML image tag is an empty tag. which means it contains only attributes and there is no closing tag.

HTML Images Syntax


Syntax Explained.

1. <img> is empty tag.

2. <src> is the attribute. it specifies the image path.

3. <alt> specifies an alternate text.

Insert Image in HTML

With the help of an HTML image tag, you can insert any images on your web page.

Let's see an example of HTML image.

Example



And the Result is,

Plant Leaf

If a browser cannot find an image, it will display the value of the alt attribute:

HTML-Images

HTML Image Width/Height

Using the width and height attribute in HTML images you can set the height and width of the image as per your requirement.



Image Location

In case your images are in different folders, you need to give the correct location/path of the folder to display the image on the web page.



Using Anchor tag in HTML, you can also use images as a link. if any user clicks on an image it jumps to another page. to do this use <img> tag inside the <a> tag.



And the Result is,

Plant Leaf

IF YOU LIKE OUR HTML TUTORIALS PLEASE DON'T FORGET TO SHARE

Subscribe for more videos on our Youtube channel. if you like our tutorial please Like and Subscribe to our Facebook and Youtube.



Previous

Next



YOUR COMMENTS ARE MOST IMPORTANT TO US:

0 Comments



Why basictutorials.in?

To Learn:

Tutorials in a simple Way.

Excel with downloadable samples.

HTML with sample website code.

PowerPoint presentations.

MS Word for offical use.

Useful Tutorials