home | writings | photo | useful | useless | contact | blog


c. tweney's collection of miscellaneous HTML tricks and pitfalls

Note: This is a loosely-organized collection of reference material, some written by me, most stolen from other sources. I hope it's useful for you, but remember: Caveat coder!

HTML & Browser Reference Sheets

  • Table of Browser Capabilities
  • Netscape Tags Sorted by Version that Supports Them
  • Frame Attributes
  • Fill-out Forms Reference
  • Compendium of HTML Elements (excellent summary of tags & which browsers support them)
  • Server-Side Includes Tutorial

  • Soclair's Resources for Web Developers
  • Search Engine Watch

  • Protect your web server from spam harvesters (highly recommended!)
  • HTTP Status Codes


    Small Javascript tricks

    JavaScript code to prevent other sites from framing pages:

    	     <body onLoad="if (self != top) top.location = self.location">
    	

    ergonomic cool-color backgrounds

    (from david siegel's most excellent Tips for Writers and Designers)

    This is the minty green background. It's nothing new. You just saw it on the main ergonomic page. I have a Macintosh with 16 million colors. On my system, it shows up as a very light cool green. This page starts off with the following header:

    Minty Green Background:
    <body bgcolor="#EEFFFA" link="#CC0000" alink="#FF3300" vlink="#000055">

    Light Blue Background:
    <body bgcolor="#F8F8FF" link="#CC0000" alink="#FF3300" vlink="#005522">

    To set it, simply go with about 96% red, 100% green, and 99% blue. Set the active links dark blood red and the visited links navy blue. That should do it on any system.


    Graphic loading troubles:

    Dear Dr. Website: I have noticed that on certain Web sites the graphics will not appear until after loading, regardless of the browser's settings. I am currently developing several sites, a few of which suffer from this problem. What exactly is the cause of this, and is there any way to force the graphics to appear while loading?

    Take a look at the pages where you noticed the problem. Are the graphics contained in tables, most likely tables with both text and other graphics? It's a good chance they are, and usually, graphics within tables (and text, for that matter) only appear when the whole table is finished loading. Make the table smaller by breaking it down into several small tables stacked on top of one another.


    Stupid Browser Bugs

  • The Win 95 version of Netscape 4.0 (aka Communicator) has a bug in <SELECT> forms. If you are using a JavaScript onChange() method on the SELECT, you must have a separate "GO" box (INPUT type="button") next to the SELECT listbox. Otherwise, the user cannot select and click the first item in the SELECT list. Sucky bug, eh? (bug reported by lucie melahn)