Putting Images on a web page

Last Up date: 2009 November 11
Recent changes: Made background darker
This Page started on: 2006 December 01 16:51:47

Photos drawings etc. put life into a web page and are quite easy. They are done with the "img" tag. Like the "a" tag it requires in quotes the name of the file that contains the image. Image files, for the internet, should have a name extension of: ".jpg" or ".gif" and all browsers can handle this type of image. There is no guarantee other types will work.

Both, .jpg and .gif are "compressed" and will be much smaller than some of the other types. You may need to use some photo processing software to reduce the size of your photos to something reasonable for the internet. The size photo you put on the internet is up to you, but if it is large it will take some time to load, and may require the viewer to scroll and only look at parts of the photo. For larger photos I like something about 800 pixels wide, this leaves a little room for text along the side of the photo.

Rules:

  1. The image tag starts with: <img src=
  2. Followed by the image file name in quotes
  3. After the closing quote I like to use align=
  4. The "align=" can be followed by:
  5. After this closing quote you can use alt=" followed by a short text description of the image.
  6. The "alt" text must have a closing quote.
  7. Finally you end the <img tag with >
  8. Lastly, the "img" tag does not have a closing tag.

Yes, there is more to an image than we have seen before, but it is not bad. However, I must remind you: When you up-load an image it must be sent as a "binary" file. If it is sent as an "ASCII text file" some of the bytes in the image get changed, which will completely screw up the image. This problem exists because of differences in the text conventions used by UNIX (which more or less defined the internet) and traditional PC DOS/Windows. Contact me if you want more details, about this historical disaster.

I use the Windows Command line FTP to upload to my web site, and one of the commands there is: binary and another is ascii. ASCII is the default, so I have to remember to switch to "binary" before I put images.


E-mail me or Click the phone block to call or get link to my BIO page.

Go to: My Home Page My phone #'s Go to: This page TOP