BleepingComputer.com: Do you write your HTML or CSS first?

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Do you write your HTML or CSS first?

#1 User is offline   JoshuaGaler 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 3
  • Joined: 11-February 10

Posted 11 February 2010 - 11:36 PM

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?"

#2 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,605
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

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 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,834
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

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 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

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.

#5 User is offline   tomylee 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 2
  • Joined: 07-April 10

Posted 10 April 2010 - 01:51 AM

i write HTML first.

#6 User is offline   deltacoolguy 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 76
  • Joined: 09-December 05

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 User is offline   castoffpolite 

  • Forum Regular
  • PipPipPip
  • Find Topics
  • Group: Members
  • Posts: 152
  • Joined: 26-October 10
  • Gender:Female
  • Location:Somewhere in Nebraska, I think.

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 User is offline   Martel 

  • Bleeping Junior Member
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Malware Study Hall Junior
  • Posts: 1,233
  • Joined: 05-January 07
  • Gender:Male
  • Location:North Carolina U.S.A. Japanese spoken here

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
.
.
.
Posted Image

#9 User is offline   CrimsonSpider 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 87
  • Joined: 28-October 10
  • Gender:Male
  • Location:The Matrix

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..... :lmao:

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)

#10 User is offline   castoffpolite 

  • Forum Regular
  • PipPipPip
  • Find Topics
  • Group: Members
  • Posts: 152
  • Joined: 26-October 10
  • Gender:Female
  • Location:Somewhere in Nebraska, I think.

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
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users