Computing.Net > How-tos > Web Development > How to load images to web pages

How to load images to web pages

By: Radix-64

Here are the steps to load images to web pages:

Step 1:
Upload the image file itself to your hosting provider or server. As a best practices, create an image folder directory for all of your web site images. This is not necessary, but a nice way of categorizing your online content which will make for easier web site maintenance.

Step 2:
Once you have that image loaded, test to see if it loaded successfully by going to the URL that has the image. You should see the image only when you go to that URL.

Step 3:
Now, if you want your image to appear embedded in your HTML page, you need to make sure that the URL for the image is coded in your HTML. You can either provide an absolute (complete) URL or a partial reference (relative) URL.

For an absolute URL reference, (http://domain.com/images/picture.jpg) as an example, you would need to make sure that this URL is in your HTML code where you want your image to appear.

For a relative or partial reference, you could code your HTML to just (images/picture.jpg) as the source file image.

If you didn't want to create an image folder directory, you could load your image to (http://domain.com/picture.jpg) and code that for the absolute URL. For the relative URL, you would code in your HTML (picture.jpg).

For both cases, do not include these symbols ( ) in your URLs.


Related Posts

See More