I’ve been working with CSS for quite a few years now. Based on that experience, this article will share some of the best habits and practices that I have found to be helpful and beneficial in the areas of organization, performance, readability and typography. By now, I think it’s safe to say that most designers on the web are using CSS in some capacity. Even those (misguided) individuals who are still using table-based layouts have a tendency to use CSS for some basic styling, such as establishing fonts and link colours. With that in mind, I thought it might be worthwhile cover some of what I have found to be best practices.
Before getting started, it’s important to note that these are practices and habits that I have developed based on my own experience, which includes developing different sites, my own experiments and reading from a variety of sources. While I have my own reasons for the way I do things, I am in no way presenting the following as CSS gospel that absolutely needs to be followed. As with anything, take what you read, weigh it against your own knowledge, values and experience in order to formulate your own methodology.