We have so far established that during the planning stages of any professional or commercial website, both user interaction and search engine compatibility must be considered. Proper code will not only streamline the flow of customers and viewers, but it will leave them with a fantastic impression of the website, free of errors and irritations. Similarly, search engine spiders will be met with validated, concise code which can be quickly parsed and indexed properly. Not only can this potentially increase a website's ranking among search engine results, but it allows the search engine to effectively detect relationships between various pages within a business website, and provide these related pages as additional results, further increasing exposure.
Initially, we will concentrate on four "best practices" we recommend for proper optimized code.
- W3C Validated Code (we have touched upon this before, and we will again.)
- Proper incorporation of scripts and external programs.
- Effective use of stylesheets (CSS)
- Proper insertion of metadata in the form of META tags.
Each of these topics will be covered in a dedicated blog post, but in the meantime, we recommend designers adhere to a set of general coding practices which ease a lot of hardship when attempting to validate code:
- Always close any HTML tags you open. There are few exceptions.
- Know the default attribute values; get into the habit of assigning values to each attribute, in case defaults are different between browsers and platforms.
- Use lowercase EVERYWHERE.
- Set up an intuitive and expandable file system, and only use A-Z, a-z, and 0-9 (and underscores) in your filenames. File systems can become bogged down quickly, and an organized hierarchy is invaluable down the line.
- Keep accessibility in mind, for people with disabilities or limitations on their browsing. (We shall touch upon this later)
- Never automatically trust code that you didn't type out yourself. (Dreamweaver and Frontpage, for instance)
Stick to these guidelines and validation will become almost automatic. Detail will be provided in future blog posts, as to how to properly make the most of these various practices.