Basic Principles and Techniques:

Always develop (write your code) in the most standards-compliant browser available. In 2009, this means Firefox. If your mark-up is standards-compliant, your work should look virtually identical in the other major browsers. With the huge exception of Internet Explorer 6 and 7. You may have to do some timkering so that your page looks the same there as well.

Firefox has some excellent built-in tools you should get to know. The error console is essential. (Find it under the Tools menu.) Basically, it prints an entry for every CSS and javascript error it runs across. Before you load a new page, open the Error Console and hit the Clear button, so that you're not looking at everyone else's errors. Load your page. Look at the error console immediately. Fix anything that comes up. Errors are usually identified by line number, which makes finding them very easy. Repeat this until no errors come up. Now you're ready to test any Javascript behaviors that get triggered by buttons or rollovers, etc. If something doesn't work right, look at the console. Repair, refresh, check, repeat.

Learn to use Error Console. Get the DOM Inspector add-on and use it.

Always use a strict doctype. Always validate your code.

Table-based layout went extinct in 1996. Use divs and CSS instead.

Don't use frames. Use PHP include statements instead. (It's easier than you think!)

Use float and clear instead of position and coordinates.

Is your element a few pixels off? Try {margin: 0; padding 0;}

document.write() is evil. Set some element's innerHTML instead.

select_value = select.options[select.selectedIndex].value;

element_array = document.getElementById(parent_id).getElementsByTagName(tagname);

Use border-top or border-bottom instead of <hr>.

Start a new <div> or <p> instead of using <br>. Top/bottom margins add vertical space.

Use left/right margins or padding instead of &nbsp;&nbsp;&nbsp; etc.

Master AJAX with some test documents before adding it to a project under construction.

To center an item in CSS: item_parent {text-align: center;} item {margin: 0 auto;}