
 |

| 

Advanced topics
|
Now that you know the code, here's some things to keep in mind to help
you write good html. |
| |
| Size and speed |
Watch that size
Keep a general idea of how much data is being sent to the user on your
page (total image sizes, html page size, etc..). A lot of users use slow
modems (28.8kb/s) which translates to a measly 2-4k/sec. If your page and
images' size is 50k total, it'll take 20-30 seconds for the user to completly
download and view your page.
|
| |
| <body> |
Use BGCOLOR option
Even if you have a background image, use the BGCOLOR option. On most browsers
if the the background image hasn't downloaded yet, your page will be given
the default background color. By setting the BGCOLOR option to a color close
to the main color of your background image, your page won't look too weird
to the user before your background image loads.
|
| |
| Tags |
End all tags that you can
Make sure to end all tags that take end tags. Sloppy code can cause
unexpected effects when viewing your page in different browsers.
To be sure what the user sees is what you planned, make sure
your code is clean.
|
| |
| Images |
WIDTH & HEIGHT options
Use the "width" and "height" options in your IMG tag. It causes the
browser to reserve that much pixel space on the page and continue
loading the rest of the page. The result is the page will load all the text
based stuff first, then bring in the images as they download. Otherwise,
the page will pause loading until each image has downloaded.
Understand the WIDTH & HEIGHT options
If you put values other than the actual pixel size of the image in the
"width" and "height" tags, the image will be displayed that size, but
all the browser did is stretch or squish the image and the file size will not change.
Don't put up a huge image and think it'll load fast if you change
the pixel size in the IMG tag.
Removing link border on images
When you make an image a link, by default a 1 pixel border will be put
around the image (color determined by the <body> tag). To
get rid of this border, use the BORDER=0 option in the IMG tag.
ALT option
By using the ALT option, the user can get an idea of what the image
will be if it hasn't fully downloaded to their browser yet. Also, on
most current browsers, the ALT info will be displayed when the user has
the cursor over the image. This is usefull if the image is a link for
a short description of the link.
|
| |
| Different Browsers |
Check out your pages
Different browsers have they're own way of displaying such things as
tables, frames, spacing, and even colors. Verify your page looks the way
you planned on a variety of browsers (Netscape, IE, different versions, etc.)
and if possible on different type of Operating Systems (PC's, Macs,
Unix Machines, etc..)
|
| 














|
 |
| |