Here are some tried and true techniques for getting the kinks out of a Web page.
• Check the easy stuff first.
• Be observant and methodical.
• Work incrementally. Make small changes, and test after each change. That way, you’ll be able to pinpoint the source of a problem if one occurs.
• When you’re debugging, start with what you know works. Only then should you add the hard parts chunk by chunk—testing the page in a browser after each addition—until you find the source of the problem.
• Use the process of elimination to figure out which chunks of your code are giving you trouble. For example, you can comment out half of the code to see if the problem is in the other half . Then comment out a smaller portion ...