How to Use img src

Anyone who wants to make websites should learn how to use img src. This code snippet or tag is what allows you to put a picture or image on the Web page. All you need is the image and a simple text editor.

Step 1

First, upload your image onto a free hosting website. There are several of these on the Net and you can find them using a search engine. Follow the instructions on how to upload the image. Make sure to get the image’s URL address.

Step 2

Open your text editor. Put the cursor where you need the image to appear.

Step 3

Enter the HTML image source code. Make sure to use angle brackets. Set quotation marks following the entry. Here is an example:

<img src=””>

You will have a placeholder for the picture.

Step 4

Type the image’s URL in-between the quotation marks. Example:

<img src=””>

Step 5

Now you have to type “alt=” in an angle bracket. Next, write something that describes what the image is. Type this inside the quote marks. Example:

<img src=”” alt=”A map of Japan.”>

The alt component helps users know what the image is even if the image is not loaded.

Step 6

Save the HTML file. The picture should now appear on the page.

Method II

Here is a slightly different way to learn how to use img src.

Step 1

Get an FTP client and put the image in the “images” folder. Use the FTP program to upload the image to a Web hosting service. Write the image’s name and location.

Step 2

Put in the following HTML tag where the image should appear:

<img src=”#”>

Step 3

Type the image location at the <img src=”#”> tag. If you want to add a border to the image, type “border=1” within <img src>. You can also add the alternate text in the same manner you did earlier.

You can repeat these steps for the other images.

Tips and Warnings

Make sure to position the image where it won’t distract from the page layout. If you want to get rid of the border, put in border=”0″ at the <img src=#>. Don’t make the images too big as they will take a long time to load. If you are going to use copyrighted images, get permission from the owner first.

As you can see, learning how to use img src is easy. By knowing how to put images on Web pages, your site will become more attractive and appealing.

Related Posts