Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the Google homepage use deprecated HTML (ie. is not valid HTML5)?

I was looking at the www.google.com in Firebug and noticed something odd: The Google logo is centered using a center tag.

So I went and checked the page with the W3C validator and it found 48 errors. Now, I know there are times when you can't make a page valid, especially when we're talking about something like www.google.com and you want it to be as small as possible, but can someone please explain why they use the center tag?

like image 781
Adrian Mester Avatar asked Jun 24 '09 12:06

Adrian Mester


2 Answers

Because it's just the easiest, most concise way to get the job done. <center> is deprecated, for sure, but as long as it's still supported, you're likely to still see them using it.

like image 38
Chris Tonkinson Avatar answered Oct 11 '22 04:10

Chris Tonkinson


I attended a panel at SXSW a few years ago called "F*ck Standards" which was all about breaking from standards when it makes sense. There was a Google engineer on the panel who talked about the Google home page failing validation, using deprecated tags, etc. He said it was all about performance. He specifically mentioned layout rendering with tables beating divs and CSS in this case. As long as the page worked for their users, they favored performance over standards.

This is a very simple page with high traffic so it makes sense. I imagine if you're building a complex app that this approach might not scale well.

From the horse's mouth.

like image 66
Alex Bilstein Avatar answered Oct 11 '22 04:10

Alex Bilstein