Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Do you write your HTML or CSS first?


  • Please log in to reply
9 replies to this topic

#1 JoshuaGaler

JoshuaGaler

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:08:37 AM

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

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:07:37 AM

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?

#3 Romeo29

Romeo29

    Learning To Bleep


  • Members
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:08:37 AM

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 Wolfy87

Wolfy87

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:01:37 PM

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 tomylee

tomylee

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:08:37 AM

Posted 10 April 2010 - 01:51 AM

i write HTML first.

#6 deltacoolguy

deltacoolguy

  • Members
  • 130 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:07:37 AM

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 castoffpolite

castoffpolite

  • Members
  • 160 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:Somewhere in Nebraska, I think.
  • Local time:07:37 AM

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 Martel

Martel

    Drfixup Human Internet Solutions


  • Members
  • 1,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina U.S.A.
  • Local time:08:37 AM

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

#9 CrimsonSpider

CrimsonSpider

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:The Matrix
  • Local time:01:37 PM

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 castoffpolite

castoffpolite

  • Members
  • 160 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:Somewhere in Nebraska, I think.
  • Local time:07:37 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users