views:

1393

answers:

9
+8  A: 

Yep, agreed. Sometimes, just sometimes tables are just fine. Not everyone is writing websites that are targeted at every possible browser, that needs to support text to speech etc. In general, try to learn and grow your skills and use CSS positioning etc, but nothing bad will happen if someone uses a table to position things on a webpage.

Maybe this question should be community wiki, though?

Neil Barnwell
I strongly disagree with this statement. Tables are only fine if you put tabular data in them; all other content should be marked up in a semantic way -- this makes pages fall back nicely when CSS isn't supported. (I agree on the community wiki bit though :))
You
Markup should be semantic, and agnostic of presentation... but sometimes, tables are appropriate, even for non tabular data. Economics trumps ideology, and much as it would make things simpler, there is no one true way for every single situation. I avoid tables like the plague, they are a PITA, but no kittens will actually die if you do use a table, and sometimes, it just works better.
seanb
You wouldn't believe the downvotes I've had on this answer. Geez. 7 upvotes and 8 downvotes, no less. People get really weird about this sort of thing.
Neil Barnwell
@Neal - you got +1 from me for being pragmatic. I used to be quick to leap to judgements about other people doing things "wrong", now am more willing to offer my peers the benefit of the doubt, and realise that maybe they had a good reason for doing it that way, amidst the varying imperatives of real world development - things are not always as cut and dried as academic abstracts. The pragmatists at google and twitter probably thought about it very hard, and do it that way because it works best for them right now - not because they are lacking css skills or just being lazy.
seanb
+4  A: 

It's evil, it's a pain, but rendering is pretty much guaranteed to be consistent across different browsers.

karim79
whats evil ? ( more specific,please ! )
n00ki3
@n00ki3 - IMHO, mostly the ugliness of the markup compared to a CSS layout.
karim79
@n00ki3: Tables are for tabular data; using them for layouts is unsemantic, inefficient, unmaintainable, and almost guaranteed to confuse screen readers and the like.
You
+12  A: 

Page load time is king for these guys, and bandwidth usage is extreme.

I'd have to say they use tables for raw data speed, since they are serving up so much bandwidth every day.

Also, notice that they use inline styles in the page header to reduce the number of HTTP requests to help speed up page load time.

jkelley
huh, I absolutely didn't think about this, but it seems reasonable
Darth
I also have to agree with the other answer that tables are very useful for displaying *tabular* data. Additionally, they do provide an excellent way to get cross browser consistency for such minimalistic page layouts.
jkelley
Tabular layouts tend to use more bandwidth, not less.
David Dorward
But their tables are quite small, minimizing additional markup from the tags. They are used for laying out forms where a stylesheet may actually add more bytes to get a properly styled set of div's or block elements that render consistently across browsers.The autocomplete table on google is a mystery to me though. It seems like it would be a great candidate for a simple list.
jkelley
Twitter, at least, uses a plain old "It's 1997 again" layout table to handle it's two column layout. Google's tables also do plenty of things that are easier and smaller with CSS. They just suck at markup.
David Dorward
fair enough, i must concede. so why then would they not take the 45 minutes to streamline the markup that could save them so many GB of data per day?
jkelley
You'd have to ask them that.
David Dorward
+7  A: 

Google doesn't have to care about ranking high in search engines... ;)

Guffa
+10  A: 

Table layout gets more grief than it deserves. It's easy for developers to use, it's consistent across nearly every web browser, and it allows you to easily add rows/columns with little to no effort.

The only downside is that it goes against the mantra that your document should only contain content, and your design should be contained separately (in a CSS file).

Mike Trpcic
Table layouts aren't *easy*. They are *lazy*. There is a whopping big difference. Try maintaining someone's "easy" table-based layout and you will want to rip your hair out. The magic of CSS is not shorter upfront development time, it's maintainability and extensibility down the road.
William Brendel
In addition to making *less readable markup*, *more markup* and *less usable websites*, it's just plain bad practice to use tables where not appropriate. Plus, when you get the hang of CSS-based layouts, it's faster to do them than the old table based ones (except if you use a WYSIWYG editor, which you just should not do anyways because of the low quality code).
Arve Systad
+3  A: 

Twitter works pretty well from phones in web mode. Some web browsers are truly gruesome, so I assume Twitter does what it has to.

Given how poorly so many web sites work on phones, I'm more concerned about mobile compatibility than with the concerns of CSS evangelicals.

Nosredna
Compatibility with mobile phones and such is easily accomplished if you just care a little. That's why we have `@media`.
You
+1  A: 

Three main reasons:

  1. Tables are mainly bad for search engine reasons (there's also the issue of them messing up the DOM a bit, but that's not too bad). People don't search for Google on search engines, and people don't search for Twitter posts on generally either.
  2. Tables render consistently on nearly every browser, including smartphones (which is a big concern for Twitter especially).
  3. Tables consume less bandwidth. Both sites have immense data loads and need every bit of speed they can get.
Imagist
Your third point is wrong. Tables actually take *longer* to render than CSS-based layouts. Perhaps you meant "tables consume less bandwidth"?
William Brendel
Yes. Thanks for the correction.
Imagist
+2  A: 

Table layout is working on most browsers. Google and others want to reach all user, not some or only modern users. Having different layouts or layout technologies is hard to maintain and costly in delivering content. Table layout is not tricky. Its straight forward. You dont have to look for css hacks, browser incompatibilities or others.

Table layouts are bad. Because thy mix layout and content.

Christian13467
+1  A: 

Browser Support - These guys need to have their websites render perfectly on ALL web browsers (New, Old and Obscure). No matter who's using their websites and what OS/Browser their using, these websites need to work.

Each web browser supports it's own implementation of CSS and this causes a similar issue to that of the JavaScript DOM support in various browsers.

Page Load Time - Also their pages are optimized for Page load times. If it takes a user too long to load the page they'll just go somewhere else. There are still plenty of users without broadband, even a lot of mobile devices don't have very fast connections depending on where you are.

Chris Pietschmann