Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Google place the logo inside of a <table>? [closed]

Tags:

html

The logo on the top left of the google search result page:

https://www.google.com/search?q=why+does+google+put+logos+in+tables

Screenshot:

Google Logo on Search Result Page

Is there a reason for this? Optimization or obfuscation? Is Google just being hipster?

like image 566
Blenderer Avatar asked Apr 15 '13 19:04

Blenderer


2 Answers

My best guess: vertical alignment:

#gbqlw {
  display: table-cell;
  height: 71px;
  padding: 0;
  padding-right: 16px;
  position: relative;
  vertical-align: middle;
}

While it's not impossible to align content vertically outside of a table cell, doing so within a TD is by far the easiest, particularly when you want vertical-align: middle.

like image 197
svidgen Avatar answered Oct 19 '22 05:10

svidgen


Take a look at the source, Google's main search site breaks many 'rules'. Incorrect semantic element usage, using tables for positioning, omitting unnecessary close tags, etc. whatever uses the fewest characters. They seem to take a 'whatever works' approach, HTML that would get you downvoted if you suggested it on SO for example. You could and should accomplish the same logo positioning using CSS, but consider that they have the resources to maintain it and ensure browser compliance and a lot of incentive to keep their page size as few bytes as possible.

like image 25
Paul Avatar answered Oct 19 '22 06:10

Paul