tags:

views:

208

answers:

10

Hello,

Do all these big websites "like this one" write html and css manually or they use some automated tool to do it, as I am always struggling with it!

Thanks Vishal

A: 

They write the HTML and CSS manually, although much of "these site" are preprocessed by a server-side language, like ASP.NET.

Stefan Kendall
A: 

People use CSS frameworks to make their job easier.

You can try BluePrint which is really nice. and there are WYSWYG editors available like Dreamweaver for you to build the HTML CSS as well.

Rishav Rastogi
+2  A: 

A certain amount of CSS and HTML can be auto-generated, but for the most part, these CSS/HTML for most sites is done manually.

CSS is all about presentation, and it takes a good amount of tweaking to get things looking right across different browsers.

Robert Greiner
A: 

The almost always write it manually. HTML + CSS is usually hard to get exactly right for all major browsers without some manual tweaking.

Kaleb Brasee
A: 

They're probably writing code manually, because of some reasons:

  • clean code
  • those "big websites" should be fast, to avoid a bandwidth waste, and the human's brain can do it better than any software.
TTT
A: 

The real answer is, it doesn't make a blind bit of difference, although the chances are, quite a lot of "web 2.0" sites do hand-code their HTML. The fact is, it makes no difference because that information doesn't help you. If you're starting out learning how to write them, then you should feel perfectly entitled to use whatever editor or IDE you like to make it easier. Over time, you will feel more confident when it comes to bashing out a bit of HTML.

Rob
+6  A: 

I can take one look at StackOverflow's HTML & CSS and see they take pride in it. It's very neat and well-structured. Common formatting rules are in an external CSS file to save bandwidth and improve the content/HTML ratio. They most assuredly wrote their template by hand. Of course behind the scenes they're using ASP.NET MVC with a SQL Server database but that's irrelevant. ASP.NET MVC allows full control of your markup and they obviously took full advantage of that.

I haven't created anything quite as big as StackOverflow. But I too will write my HTML & CSS from scratch. Of course, I'm an obsessive optimizer. When hand coding a site like this I push all formatting to my CSS file and keeping my HTML as clean as possible. As a result the HTML of my home page at regexhero.net is about 5.5 KB and I have a 35% content-to-html ratio which is good for SEO.

Now, some of the IDE's out there such as Microsoft Visual Studio or Expression Web do have some handy code hinting (aka Intellisense) to help you out. As you type, it's smart about showing you relevant tags in HTML and selectors in CSS. For those like myself who like to hand code everything, this feature is very nice to have.

But to sum up, hand coding may take a little longer for the developer but it does allow you to better optimize the site. And that can pay its dividends by reducing server bandwidth and improving the user experience.

Steve Wortham
+4  A: 

If stack overflow kept static html files of every page, well that would be impossible. Server side languages like ASP.NET or PHP are used to generate the page, using the same template each time. To do that, they get the information from a database, e.g. MySQL, SQLite, XML files, etc. People also use CMS's like Drupal of Joomla, which keep all the data organized and do all the work of generating the page for you.

Seperating data (e.g. the plain text of your question), the appearance/display (CSS) and the Controller, the in-between part (server-side code - PHP, ASP.NET, etc.), is called MVC, for Model (data) View (display) Controller (in-between), and using the MVC design pattern is good practice.

Mk12
+2  A: 

I think that you may have been a little vague in your question, and were really asking the age old question of "what-you-see-is-what-you-get editor or hand editing?"

For that, look here:

http://stackoverflow.com/questions/540023/wysiwyg-editor-vs-hand-code

or here:

http://stackoverflow.com/questions/406052/do-most-web-programmers-not-designers-use-wysiwyg-editors-or-hand-code-their

My take: Use a wysiwyg editor to do fast prototyping of the pages, and then when you get something that seems like what you want, simplify the code yourself by hand, to the extent that you can. Then you get the best of both worlds. Alternatively, start with a good base page ( Blueprint css reset, for example, is recommended), and then hand code additions off of that base.

As far as server-side scripting, you're pretty much always going to want to make use of templates, so in the end, the best stuff usually comes down to hand-coding.

Tchalvak
Well its a simple question :) which is asked correctly. I am aware of all the tools! but was curious to know if you really use them or do it manually... Thanks for your answer, it was helpful
Vishal
+1  A: 

A bit of both generally. You'll create your CSS manually initially and define rules for HTML generation in your code. But then you don't write the HTML on each new page manually - your engine (CMS or your MVC view or whatever) then generates the HTML automatically based on your rules.

Look at blogging with WordPress for instance. I create my own stylesheets for my own theme, and define the HTML to be used to structure a page. After that I don't touch the HTML / css again, and concentrate on the task in hand, which is blogging, not writing HTML.

Kris C