First principles
In order for our pages to work correctly the code within them needs to be formed correctly.
Web browsers are very forgiving of mistakes in code and so bad code is usually not apparent and often not a problem. Many good and useful sites get away with terrible code, but their structure allows for this, and in collusion with flexible browsers the sites get along just fine.
However, to do more than just get along, especially when dealing with the content of a content-managed web site, the system can't afford to be so relaxed.
Luckily for us, the role of the database and the constraints of good code design actually make our lives a lot simpler. As long as we follow the rules, we can write simpler, cleaner, more robust code and have it appear just as we want it to.
The philosophy we should hold, the attitude we should adopt, follows these basic principles:
- The code is only there to clarify and amplify the content.
- The code should be the simplest possible to accomplish the task.
- The code should not interfere with future uses of the content.
- The code should not require special circumstance at the user end.
- The code should be standard well-formed HTML or XHTML.
