Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Do you write your HTML or CSS first?
Old 01-01-2010, 05:52 AM Do you write your HTML or CSS first?
Junior Talker

Posts: 4
Name: Bruce Smith
Trades: 0
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?"
__________________

Please login or register to view this content. Registration is FREE
BruceSmith is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-01-2010, 12:23 PM Re: Do you write your HTML or CSS first?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I usually start with a basic HTML structure, just a wrapper DIV, and elements I think will be needed for the top and footer parts of the site. Sometimes I'll throw in the structure I think will be required for the navigation, but it is a complex navigaiton, I'll wait till later.

After I have a basic HTML structure, I do some basic CSS: get the wrapper sized and positioned correctly, do the font-size defaults, and style most of the text how I think it should be defaulted.

Once I have what I think is a basic, but simple structure, I start to go back and forth working out the details. I try to think about details like reusable styles, and take some time to make comments in my style document, organizing it into sections that make sense to me. If the design calls for interactive content, I usually add a JavaScript library and have a script add a class to the BODY element so that I can "know" from my CSS document whether JavaScript is enabled.

Once I've worked out enough details to have a mostly complete template page, I remove whole sections of the template, parts which will be used commonly throughout the site, and place them into seperate files, to use as common includes. I do other things like connect to a database, create initialization files, etc.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 01-01-2010, 01:52 PM Re: Do you write your HTML or CSS first?
Novice Talker

Posts: 5
Name: Laura Smyth
Location: Manchester
Trades: 0
Yes, I would say I work similarly to you Bruce. Once I have a design, I then start with the basics in html and then start adding the fancy coding in css. It just seems logical to me, but then again I'm still finding my way around css!
LauraDrinksTea is offline
Reply With Quote
View Public Profile Visit LauraDrinksTea's homepage!
 
Old 01-01-2010, 02:30 PM Re: Do you write your HTML or CSS first?
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
It really doesn't matter what you write first, but here's a good general rule when it comes to this question:

If you are designing a large site (dynamic based) then create your style sheet(s) first because you should have already planned out a color scheme for the site. Other wise, if it's a small site, then you should just do the html side first, then go back and do the css or even the body bgcolor would be fine to add since it's not too much to keep up with.

Hth,
-Brian
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 01-01-2010, 02:45 PM Re: Do you write your HTML or CSS first?
Average Talker

Posts: 27
Trades: 0
I did coding for a while, and I will be honest I do not even understand why in the world we would ever need to use css?
My whole web layout, including background colors, orientation and images is operated off of my SQL table, its so much more simpler, rather than having to look at painful code each time and decide what to change, you simply look into section for each and decide what you want to change.
If anyone disagrees please explain to me how css is better.
Also I guess I do not use css since I never bothered to get into it
__________________
Those who can: learn. Those who can't: teach.
Cinatas is offline
Reply With Quote
View Public Profile
 
Old 01-01-2010, 03:25 PM Re: Do you write your HTML or CSS first?
Knight13's Avatar
Defies a Status

Posts: 10,289
Name: Knight13
Location: Cleveland, Ohio
Trades: 0
When i build websites i am usually all over the place, but i start with a little html then get into the css.
Knight13 is offline
Reply With Quote
View Public Profile
 
Old 01-01-2010, 03:43 PM Re: Do you write your HTML or CSS first?
Novice Talker

Posts: 5
Trades: 0
i start with the psd and then move on to html
liror is offline
Reply With Quote
View Public Profile
 
Old 01-02-2010, 04:23 AM Re: Do you write your HTML or CSS first?
Junior Talker

Posts: 4
Name: Bruce Smith
Trades: 0
Hi There!!
Thanks for your suggestion.
I started with html today onwards.
I really appreciate your time and efforts.
BruceSmith is offline
Reply With Quote
View Public Profile
 
Old 01-02-2010, 01:35 PM Re: Do you write your HTML or CSS first?
MrBrettMunro's Avatar
Novice Talker

Posts: 6
Trades: 0
Quote:
Originally Posted by Cinatas View Post
I did coding for a while, and I will be honest I do not even understand why in the world we would ever need to use css?
My whole web layout, including background colors, orientation and images is operated off of my SQL table, its so much more simpler, rather than having to look at painful code each time and decide what to change, you simply look into section for each and decide what you want to change.
If anyone disagrees please explain to me how css is better.
Also I guess I do not use css since I never bothered to get into it
Got any examples of this? It sounds a bit crazy.

I do the basic HTML first after creating the design in PS. I've been trying a 960 grid system recently. Seems fast and easy.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
MrBrettMunro is offline
Reply With Quote
View Public Profile Visit MrBrettMunro's homepage!
 
Old 01-02-2010, 04:47 PM Re: Do you write your HTML or CSS first?
Super Talker

Posts: 127
Name: Darren Fox
Location: Illinois
Trades: 0
I progressively work my way down starting with the header bouncing back and fourth from html to css.
__________________
Darren Fox
Idea Web Design + Internet Marketing

Please login or register to view this content. Registration is FREE
darrenfox is offline
Reply With Quote
View Public Profile Visit darrenfox's homepage!
 
Old 01-02-2010, 06:31 PM Re: Do you write your HTML or CSS first?
Junior Talker

Posts: 2
Name: Jason
Trades: 0
I wrote my HTML first, considering I will do mostly "skeleton" coding and then I write my CSS. Like every other person, a web page should have hand, feet, arms and legs, not to mention a body and a head. CSS just says what these features look like.
__________________

Please login or register to view this content. Registration is FREE
.
jfreemon is offline
Reply With Quote
View Public Profile
 
Old 01-04-2010, 02:58 AM Re: Do you write your HTML or CSS first?
Ultra Talker

Posts: 339
Trades: 0
I do both. As soon as I create new HTML element, I describe it in CSS immediately and continue working on other elements. I found it works bets for me.
__________________
Daniel, Helpdesk Leader

Please login or register to view this content. Registration is FREE
- First class web hosting services.

Please login or register to view this content. Registration is FREE
- Provide unlimited disk space and bandwidth!
Hosting24 is offline
Reply With Quote
View Public Profile
 
Old 01-04-2010, 04:15 AM Re: Do you write your HTML or CSS first?
mma
Average Talker

Posts: 22
Name: ryan
Trades: 0
The first thing that I do is I write HTML first the test it. If my structure was complete I construct separating CSS.
__________________

Please login or register to view this content. Registration is FREE
mma is offline
Reply With Quote
View Public Profile
 
Old 01-04-2010, 08:30 AM Re: Do you write your HTML or CSS first?
Experienced Talker

Posts: 45
Trades: 0
Comparing a web page to a house:

HTML = foundations
CSS = walls

How are you going to float the walls in mid-air until you build the foundations that they sit on? How can you write CSS to style your page until you have the HTML tags written that you are applying the styles to.

Each piece of CSS is styling specific HTML tags. Those tags need to exist in order to be able to style them. If you have no HTML to style then the CSS file should be empty as any styles in it are redundant as they don't actually style anything. So its essential to write HTML code first.
__________________

Please login or register to view this content. Registration is FREE
printrobin is offline
Reply With Quote
View Public Profile Visit printrobin's homepage!
 
Old 01-04-2010, 08:48 AM Re: Do you write your HTML or CSS first?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
Originally Posted by printrobin View Post
Comparing a web page to a house:

HTML = foundations
CSS = walls

How are you going to float the walls in mid-air until you build the foundations that they sit on? How can you write CSS to style your page until you have the HTML tags written that you are applying the styles to.
Not a perfect analogy, however. It isn't incorrect to start with some CSS. Take the example of the CSS reset, which is very common and recommended. If one uses the same reset every time, it wouldn't be wrong to set it up before writing any HTML. Also, what if you know what all of the text colors are going to be? This is a common thing to know, since there is usually a design before any code is written. Is it required that you write some text before applying color to it? After all, there is usually going to be a default color.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 01-04-2010 at 08:49 AM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 01-04-2010, 09:18 AM Re: Do you write your HTML or CSS first?
Average Talker

Posts: 29
Trades: 0
It depends who's more comfortable with what.

I usually start with a CMS
__________________

Please login or register to view this content. Registration is FREE
! st.soso ! is offline
Reply With Quote
View Public Profile Visit ! st.soso !'s homepage!
 
Old 01-04-2010, 10:01 AM Re: Do you write your HTML or CSS first?
-webmaster-'s Avatar
Skilled Talker

Posts: 80
Name: Chrisy
Trades: 0
First I make graphic layout then I work on both html and css and scripting as well.
__________________
sru sru sru
-webmaster- is offline
Reply With Quote
View Public Profile
 
Old 01-04-2010, 12:04 PM Re: Do you write your HTML or CSS first?
vilyanurchandra's Avatar
Super Talker

Latest Blog Post:
Elephants can’t jump!
Posts: 101
Name: Subash Chandra Poudel
Trades: 0
I don't think coding with all that HTML and css is best way.
I personally use wordpress in all of my site and edit already made wordpress plugins , themes to gain website versatility.
__________________

Please login or register to view this content. Registration is FREE
vilyanurchandra is offline
Reply With Quote
View Public Profile Visit vilyanurchandra's homepage!
 
Old 01-04-2010, 12:38 PM Re: Do you write your HTML or CSS first?
Average Talker

Posts: 27
Name: john
Trades: 0
I kinda do my css while i do my html,
you know lol
as i work in HTML I code Css too lol
__________________

Please login or register to view this content. Registration is FREE

"Changing the web with low rates"
Johnyoung is offline
Reply With Quote
View Public Profile Visit Johnyoung's homepage!
 
Old 01-04-2010, 03:13 PM Re: Do you write your HTML or CSS first?
Banned

Posts: 421
Location: Boston, MA
Trades: 1
Being a developer I take the most straightforward approach of doing HTML and CSS together
webcosmo is offline
Reply With Quote
View Public Profile Visit webcosmo's homepage!
 
Reply     « Reply to Do you write your HTML or CSS first?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.27289 seconds with 12 queries