Writing Better HTML
November 13th, 2008
There’s a great post over at smashingmagazine.com recommending 12 Principles for Keeping Your Code Clean. It brings up stuff like using the Strict DOCTYPE, encoding special characters, proper indentation, and more.
One note on indentation. I used to tab out my code in the past. It’s quick and makes it easier to read. However, if you are a designer that is coding the same website on a MAC and PC (this happens occasionally for me), use spaces to tab out your code, not tabs. Notepad will not recognize the tabs and it will display your code in one big line for the entire page! Talk about annoying. It will recognize the spaces though – so space it out to be safe. It’s a little harder to read but it will save you a headache down the road.
Print This Post









Comments