Why doesn't google.com use double quotes around the values ​​of some HTML attributes?

I looked at the source code of google.com (web rendering version c. ;-)), and I noticed that they do not always use double quotes around the values ​​of some HTML attributes, for example:

<a onclick=gbar.qs(this) class=gbmt id=gb_10 href="http://books.google.com/bkshp?hl=en&tab=wp&authuser=0" onclick="gbar.logger.il(1,{t:10})">Books</a> 

What is the advantage of coding your site?

source: www.google.com

+7
source share
2 answers

Because HTML doesn't care. No quotes required. In the case of a boolean attribute, it doesn’t even need a value once (for example, disabled vs. disabled="disabled" ). Only XML (and XHTML working with an XML type) cares about the syntax in this way because the XML specification determines that they are needed.

+4
source

I believe that this is done to reduce the size of the HTML page as much as possible. Because when you serve as many pages as google, every byte counts. I remember there was an article about this recently. They also do not close many opening tags and some other things.

EDIT: Found an article from 2 years ago: http://blog.errorhelp.com/2009/06/27/the-highest-traffic-site-in-the-world-doesnt-close-its-html-tags/

+2
source

All Articles