ON Forums

Full Version: Do you write your HTML or CSS first?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?"
In this case,you should have to write the CSS and then HTML so that this programming going to make easy and good for the output. And also use some various CSS so that you can easily get the meaningful output.
If you are writing in-line code then it will be more convenient for you to write CSS first, If you will write both together then it will make you confused. I would like to suggest you that if you will make a individual file .css then it will be more efficient because you will not get confused. I hope this will help you.
Reference URL's