Over the last week I’ve been rebuilding my website from the ground up, at first it started as a small project to transform the core parts to object-oriented php as a learning excercise. However, I soon realized that once I was at it I might as well take the opportunity and rewrite the output the embrace some new technologies and better practices to generate cleaner and more modern HTML that hopefully is easier to style and even better for Search Engine Optimization.
The goal with the HTML output was to reduce the code to content-ratio (which was already quite good), reduce the amount of code and content before the main content of the page and provide more semantic tags by using HTML 5 (<article> for blog posts etc.) instead of using divs’s with different classes. In the classic practice of using both belt and suspenders I’ve also incorporated microformats into the output. Microformats clutter the code with more classes that it might otherwise be possible to skip but I think that it’ll be good for better search engine indexing and that the pro’s outweigh the con’s. Specifically, Google has said thay they embrace microformats and they provide more hooks to which CSS can be added until all browsers support CSS3.