Why would Google use a font tag?

2019-01-11 08:33发布

So, I couldn't help noticing while demonstrating Chrome's DOM browser thing to my brother, that Google uses a <font size=-2> tag.

I know this is a stupid question, but from a programming point of view--why would they use a deprecated tag on Google? Is it because it's smaller than using <p class="whatever"> and then creating a style for it, or just going <p style="font-size: x-small">?

3条回答
走好不送
2楼-- · 2019-01-11 09:06

Saving a few bytes on the Google homepage likely saves them terabytes of transfer bandwidth.

查看更多
看我几分像从前
3楼-- · 2019-01-11 09:13

Space saving issues is certainly one reason google might use the font and center tags. Another reason could be for compatibility.

It's in google's best interest to make their homepage to work in all browsers, including pre-IE6 and mobile browsers. Since the font and center tag are so ancient, they're almost universally supported.

查看更多
霸刀☆藐视天下
4楼-- · 2019-01-11 09:26

In November 2005, Matt Cutts, a Google software engineer, said:

Google’s home page doesn’t validate and that’s mostly by design to save precious bytes. Will the world end because Google doesn’t put quotes around color attributes? No, and it makes the page load faster.

Source: Google Blogoscoped - Matt Cutts, Google’s Gadgets Guy (Interview)

查看更多
登录 后发表回答