Start with HTML

Blog | Feb. 17, 2010

At work, our web site code is becoming a morass of nested <div>, <p>, and <span> tags. Our CSS file alone is nearly 3,000 lines long. Since the CSS is so byzantine to begin with, whenever a redesign comes along, frequently us poor developers — rather than untangle this Gordian stylesheet — simply declare new classes and bolt them onto the end of our stylesheet; hence the 3,000 line CSS file. This has to stop.

I propose a new solution for developing web pages: start with HTML. Imagine you are developing a clean, informative page for Mosaic. Only once your HTML is done do you start mucking it up with CSS. Have we forgotten this is the way style sheets were intended to be used? We’ve let them be perverted to add rounded corners, fix IE bugs, and even add arbitrary spacing. Your CSS will be much cleaner and more meaningful if you start with the information as the structure, and then build on that.

Comments

Comments are closed.