Use HTML validator on Firefox (only available for Windows).
Code with XHTML 1.0 Transitional or Strict. Fix the errors in Firefox.
Using the XHTML DOCTYPE will help IE try to get it right.
I use Perl CGI and then build a module to handle the repeatable stuff like headers, footers and so on.
Then the page code looks more like :
Code:
#!/usr/local/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser); # errors to browser
use mymodule;
# call my wrapper code, return the CGI object for local stuff
my $q = mymodule::StartPage("Page title","Subtitle","css file");
...
At some point I'll need to look to templating.