Golden Rules

From CSS Discuss

Jump to: navigation, search

Perhaps it would be useful to have a set of "philosophical golden rules", or at least general coding principles. These are rules that should theoretically apply to all XHTML/CSS pages. "Best practices" and so on. For example:

  1. Do not rely on browser defaults for styling
  2. Validation of CSS and XHTML
  3. Keep the number of nested tags to the minimum
  4. Logical content order in XHTML
  5. Comment your CSS hacks, ideally with the standard name and perhaps even a URL and an explanation, so they can be removed when no longer necessary and/or kept up to date.

There needs to be more discussion about these.


Proposed:

  1. A font-size smaller than normal should be the exception on a page, not the rule.
Personal tools