O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Trying Some Debugging Techniques

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required