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 markup 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 inline styles and find where I can put
them in the stylesheet to keep order.
I'm considering moving to a more testdriven development approach, where I mock all of my CSS
first, then code the markup. 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 markup structure. So coding the
HTML is the easy part.
Thoughts on your current approach and my proposed "CSSdriven development?"
Page 1 of 1
Do you write your HTML or CSS first?
#2
Posted 12 February 2010 - 12:05 AM
This is sort of a weird question.... if you write the CSS first, to what are you going to apply it? How do you know if the CSS is like you want it?
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens
#3
Posted 12 February 2010 - 08:32 AM
I think first you need to draw your plans on a paper using a pencil. Then keeping in mind your plans, create CSS and HTML together, testing and building the whole site slowly - one step at a time - applying new ideas as the pop up.
#4
Posted 17 February 2010 - 06:01 PM
Like romeo I would code the html and CSS along each other.
If I had to do one before the other though it would have to be html.
If I had to do one before the other though it would have to be html.
#6
Posted 12 April 2010 - 06:02 PM
I write them together, though the CSS usually ends up pretty much finished first as I get the format and layout down. I go back to the CSS file(s) only occasionally for a little tweaking here and there as I make more html pages.
#7
Posted 28 October 2010 - 04:36 PM
I do HTML first. From that I write the CSS. I can see my html code in my browser, then set the components in the CSS for the modules.
#8
Posted 30 October 2010 - 09:21 AM
That online tut is an interesting page, I have yet to find their css tester.
I use the W3C validator
I use the W3C validator
.
.
.
.
.
#9
Posted 07 December 2010 - 05:41 AM
Write html first, then embed the CSS into it.
Just say you work in a pie factory.
Think of HTML as a plain pie.
You want to add CSS to it, which can be whipped cream in this scenario.
Instead of putting cream on 500 separate pies
you can make it so the cream is on the pie as soon as its made.
I bet you want pie now.....
CrimsonSpider
Just say you work in a pie factory.
Think of HTML as a plain pie.
You want to add CSS to it, which can be whipped cream in this scenario.
Instead of putting cream on 500 separate pies
you can make it so the cream is on the pie as soon as its made.
I bet you want pie now.....
CrimsonSpider
"Don’t worry if it doesn’t work right. If everything did, you’d be out of a job."
(Mosher’s Law of Software Engineering)
(Mosher’s Law of Software Engineering)
#10
Posted 07 December 2010 - 11:56 PM
Crimson, that is a good idea and once I understand all the ins and out then I will attempt that. Right now I'm so upside down and inside out on a project I am working on, I can't find my rear with both hands.
Share this topic:
Page 1 of 1

Help

Back to top














