10 Rules for Coding Web Pages
This coding specification is geared toward maintenance, not the finer points of user-interface programming. It's about structuring web pages consistently and leaving obvious trails though the source code for other developers. That's why some of these rules are more work to follow during the initial site creation.
If you are working with a web page that predates this specification, whose specification is dictated by another department, or whose overall architecture precludes some of these rules, so be it. At that point, consider these rules guidelines. Follow them when you can.
Rule #1: Follow a few, basic code formatting rules.
Rule #2: Explicitly version your HTML documents. Don't rely on the browser.
Rule #3: Check your <head></head>. Structure your HTML header consistently.
Rule #4: More than two. Modularizing user-interface code.
Rule #5: Less than two. Call includes from the main web page, not other includes.
Rule #6: Declare global variables and procedures in the main web page, not in includes.
Rule #7: Handle the beginning and end tags of a markup element in the same way.
Rule #8: Name page objects and call user events with the all-browser compatible technique.
Rule #9: Loosely couple the application code and the presentation code.
Rule #10: Avoiding using nested table structures for formatting.