12-23-2009, 10:02 AM
I'm curious how other developers are coding their pages: do you write your HTML or your CSS first when mocking up new page content? What do you feel are the benefits of your approach?
I traditionally am given a design to code, and write the mark-up HTML first. I then start coding my CSS. It will get to a point where I need to quickly tweak individual elements, and I'll start coding in-line instead in the .css file. At the end, I would clean up my in-line styles and find where I can put them in the stylesheet to keep order.
I'm considering moving to a more test-driven development approach, where I mock all of my CSS first, then code the mark-up. The thought is I will iron out all of my CSS first, and by defining how the CSS functions, will have essentially already written all of my mark-up structure. So coding the HTML is the easy part.
Thoughts on your current approach and my proposed "CSS-driven development?"
I traditionally am given a design to code, and write the mark-up HTML first. I then start coding my CSS. It will get to a point where I need to quickly tweak individual elements, and I'll start coding in-line instead in the .css file. At the end, I would clean up my in-line styles and find where I can put them in the stylesheet to keep order.
I'm considering moving to a more test-driven development approach, where I mock all of my CSS first, then code the mark-up. The thought is I will iron out all of my CSS first, and by defining how the CSS functions, will have essentially already written all of my mark-up structure. So coding the HTML is the easy part.
Thoughts on your current approach and my proposed "CSS-driven development?"