News for hackers. Stuff that matters.
Re:Ask HN: Why is HN HTML laid out in tables? by nostrademons on Saturday December 18, 2010 @04:51PM (#2020400)
The big benefit is to accessibility through screenreaders or other alternate clients.

Google's HTML is also all generated. They switched to CSS-based markup in 2007. It is a bit easier to maintain, but only a little, and mostly because of obscure things like bold tags needing to be red and normal-weight in Chinese because bolded Chinese characters look like shit.

Size and rendering speed wise, it's basically a wash. The HTML is significantly smaller, but the CSS is significantly larger, and CSS is a massive pain to refactor and can easily lead to bugs.

It's much easier to manipulate with JavaScript, because the DOM structure of the page is much simpler. Tables also have weird implicit element insertion rules, eg. the first direct child of the <table> on this page is a <tbody> tag, not the <tr> tag that you outputted as source. That alone is a big reason why Google would never go back, though I don't know how much it applies to a mostly static site like this.

There are no comments on this comment yet.