Google, HTML5 and Standards

While there were lots of trumpets and elephants accompanying recent announcement of Google Wave, one of the things that could have slipped by was their public commitment to building Wave in HTML5.

Not long afterwards the W3C announced the discontinuation of the XHTML2 Working Group, to ‘increase resources on HTML 5‘ in their words. It’s pretty clear all the cool kids are wearing HTML5 this summer.

Arguably the single biggest difference between the two standards is XHTML’s insistence on ‘well-formedness’ — closing your Ps and LIs and using self-closing IMG and BR tags. Now, as Jeremy Keith points out, choosing to use HTML5 in no way prevents you from closing your tags.

However it does make closing your tags more of a stylistic choice — like getting a tongue stud or allowing your underpants to show above your jeans. As with HTML 4, you’re free to leave many tags open swinging in the breeze without fear of validation errors or other reprecussions.

Personally, like many of us, I’ve become so ingrained at writing XHTML that I feel dirty if I write so much as an unclosed P tag. I also find it easier to fix layout bugs when I can easily identify where tags finish.

But clearly not everyone feels that way — including the web’s most visible citizen.

Arguably the web’s most famous page — the classic Google Search page — labels itself as HTML5 but presents with 41 Errors, 2 warnings . Most notable of these include:

  • Using FONT (deprecated in HTML 4.01)
  • Using NOBR (I believe never officially part of the spec)
  • Using U (deprecated in HTML 4.01)
  • Using CENTER (deprecated in HTML 4.01)

Just as interesting are some of the things Google do that seem like they SHOULD be invalid, but in fact aren’t in HTML5.

  • No closing BODY tag
  • No closing HTML tag

Google search markupAs you would expect with Google, this was no accident or oversight on their part. Evidently, leaving off closing html and body tags allows their pages load faster without any negative rendering repercussions in browsers — older or new.

Of course, Google serves literally millions of pages an hour so a 2% efficiency gain per page quickly results in huge daily savings in bandwidth and loading times.

So, will HTML5 mark the beginning of a drift away from standards and the importance of validation?

Are you a pedantic tag closer for life, or does it all come down to the cold hard realities of the load time and screen render?

Win an Annual Membership to Learnable,

SitePoint's Learning Platform

  • http://www.aaronwitherow.co.uk arano

    Personally I think the pages should be strict as it makes debugging and structuring your code so much easier. As Jeremy pointed out in his excellent blog post that this option is still available in HTML 5 the problem comes when there is mass variation in the way people output code.

    For beginners learning XHTML at the moment is so much simpler, you can go to almost any tutorial website or sites you find inspirational and find pretty much the same format, when I was learning HTML, digging around in a mass of font tags, it was difficult to work out what was happening and resulted in stripping out 90% of the code to get to something understandable.

    I do fear that with HTML5 no one knows what they want it to be, there is some good debate on this at the moment but as with any new technologies (if you can call HTML5 that) people, companies etc are developing their own way rather than trying to get a solid standard foundation.

    I am excited about HTML5 and I will be experimenting with it but it seems that opinions are very much divided and I would love everyone to be able to develop in one standard way.

  • pedantic

    ironic that you’d feel dirty leaving an unenclosed tag but you’re okay with this:

    Using CENTER (deprecated after HTML 4.01

    we’re all human? :-)

  • http://bitdepth.wordpress.com/ mmj

    Unfortunately, the differences between HTML and XHTML are commonly misunderstood. HTML elements are never ‘unclosed’, though they use different methods to close than XHTML – for example, HTML has no self-closed tags and so adding a slash to the end of a tag to close it is illegal. HTML also defines some elements as having ‘optional’ opening or closing tags. You cannot do this with just any element, only those that have been defined that way in the language, and it does not mean that the element is ‘unclosed’ – the element is closed according to the rules of the language – ie, when the end of the document is reached or when the existence of a subsequent element would require the current element to be closed.

    To say that HTML5 will represent a move away from standards is quite false. HTML5 is a more attainable standard than any before it, eliminating countless situations where browser quirks forced people to deviate from standards-compliant code. People claiming to use HTML5 still will deviate from the standard, just as many people who claimed to use XHTML1 did.

  • http://blog.thenetgen.com agentforte

    Well cost is the only way to justify poorly written HTML.
    If it can save you $1000 a day, or even $2 a day, then congratulations. Your website is a success with tons of visitors. Now go and make some more profits by reducing your HTML markup.

    For everyone else, this is a bad idea. Load times are getting faster every day, not slower thanks to technology improvements. So even if your website does not change, people will be able to access it faster and faster as time passes.

    The draw backs will be unexpected layout issues and who knows how JavaScript will act. Not to mention the increasing buzz of information sharing technologies (FOAF, microformats, etc) that will rely on clean markup to easily extract information.

    -Frank

  • http://blog.thenetgen.com agentforte

    I want to make it clear in my last post that I have nothing wrong with well written HTML 5. Like mmj said, it is not that the tags are left open, it is that the end of the tag is defined differently (i.e. end of document or start of another tag that requires it to be closed).

    I still think that for sharing information, XHTML is the way to go. Just thinking about it, regular expression matching and parsing scripts would probably be more difficult with HTML 5.

    -Frank

  • http://www.krues8dr.com krues8dr

    Just FYI, google’s lack of closing tags is deliberate; they’ve discovered that even a few bytes less really helps when you’re serving a quadrillion pages a day.

  • http://www.sitepoint.com AlexW

    Just FYI, google’s lack of closing tags is deliberate; they’ve discovered that even a few bytes less really helps when you’re serving a quadrillion pages a day.

    Yep, I made that point in the post.

    As you would expect with Google, this was no accident or oversight on their part. Evidently, leaving off closing html and body tags allows their pages load faster without any negative rendering repercussions in browsers — older or new.

  • http://www.mikehealy.com.au cranial-bore

    So Google saves 18 bytes by omitting closing body and html tags, but wastes many more by using <font> repeatedly?
    Doesn’t make much sense to me.

    As for closing tags, I didn’t realize HTML4 allowed one to leave a paragraph open. Whether it’s required or not I’ll always close them because the code is much more understandable. Anyone moving from XHTML to HTML5 as their preferred markup will no doubt do the same.

  • http://www.sitepoint.com AlexW

    So Google saves 18 bytes by omitting closing body and html tags, but wastes many more by using repeatedly? Doesn’t make much sense to me.

    The thing is, you know there must be *some* reasoning behind it. Google are many things, but sloppy isn’t one of them. I’d love to see a post from them explaining their thinking on this some time.

  • schwoortz

    @cranial-bore: the thing is, old school FONT renders faster on older machines and slow to very slow connections. same is true with table-based layouts. it’s sort of immediate rendering vs. dom first, then apply css (even “worse” when css are linked as an external source).
    so, it really depends on your audience. in terms of what equipment they use, how they’re connected and their sheer mass…
    Disclaimer: I don’t do this in my daily work :-)

  • http://www.optimalworks.net/ Craig Buckler

    Google are many things, but sloppy isn’t one of them.

    I’m not so sure about that. Some of Google’s client-side code is horrendous. Switch on strict JavaScript error detection in most of their applications and you’ll be confronted by a long list of issues. Like many companies, they’re not overly worried about standards. They just want it to work so they can release it as soon as possible.

  • http://www.cemerson.co.uk Stormrider

    Personally I’ll continue to close tags where they are optional, I just prefer that syntax, and as several people have said – it can make it easier to see where you are going wrong (especially combined with indentation etc).

  • momos

    I won’t be wearing HTML5 T-shirts this summer, I don’t understand what the fuzz is all about. I loved where XHTML 2 was heading; Ture, there were a few issues to be solved… but in HTML5 there are even more issues to be solved.
    Lately it seems that standards are dictated by big companies. Which means the standard-authorities cannot work independently.
    This results in standards where features are more important than robustness…

  • Ciaran McNulty

    You seem to be under the impression that HTML5 ‘kills off’ XHTML, but that couldn’t be further from the truth. HTML5 contains a complete XML serialisation (XHTML5) that authors can use if they want to signal to the world that their documents are well-formed XML.

    HTML 4.01 -> HTML5 served as text/html
    XHTML 1.1 -> XHTML5 served as application/xhtml+xml

  • http://weblog.200ok.com.au/ 200ok

    I think I’ll keep on closing tags even if I was to start using HTML5. It makes code much easier to read, clarifies your thinking and helps debugging. HTML5 might have lowered the bar for validation but that doesn’t mean writing loosely formatted code actually helps developers in their daily lives.

  • http://www.tyssendesign.com.au Tyssen

    ironic that you’d feel dirty leaving an unenclosed tag but you’re okay with this:
    Using CENTER (deprecated after HTML 4.01

    If you’re talking about the spelling of CENTER, that’s how the tag is spelt. If not, your irony is lost on me.

  • Stevie D

    So, will HTML5 mark the beginning of a drift away from standards and the importance of validation?

    The beginning of a drift away from standards? Far from it!
    41 errors on the Google homepage is a considerable improvement on how it has been in the past. In January 2007, there were 66 errors.

  • MR

    Lack of well-formedness is going to cause a lot of head-aches and it makes it harder to write browsers, and even harder to keep all the browsers consistent. Hopefully the consequences of poor form will be enough to dissuade people, but XHTML2 is going to be sorely missed, even though XHTML1 was never really used as intended.

    People can argue that lack of format enforcement can be beneficial in macro-web development, but for the other 99.999999% of web sites, it’s not relevant.

  • http://www.drivendevelopment.com drivendev

    I still have a lot to learn about the differences between XHTML1 and HTML5 but I am very disappointed by the fact that HTML5 will allow optional closing tags. To me it really felt like things were on the right track with XHTML, especially when it came to the stricter formatting requirements. It really gave us web developers a clear guide for how to correctly and consistently format our HTML documents. Now it feels like we are stepping backwards several years or more to when our lives as web developers were so much more difficult trying to read and debug HTML. I think it will also lead to very inconsistent web development styles (e.g. closing vs. no closing tags, uppercase vs. lowercase tags) just like it did in the past.
    One thing I have been curious about is why HTML5 won’t/can’t merge the stricter formatting requirements of XHTML? Could the HTML5 standard be designed such that closing tags would be required or does this fundamentally not work or go against the standard? Why can’t we have the best of both worlds? If anyone knows the answers, I would love to know and hear your thoughts.

  • technology4u
  • technology4u

    Why HTML is so useful??
    i4unews.com

  • djbaxter

    To add to this, check out the latest update to Internet Explorer’s compatibility list: http://blogs.msdn.com/ie/archive/2009/07/21/update-on-the-compatibility-view-list-in-internet-explorer-8.aspx

    There are a lot of big names listed as non-standards-compliant and therefore requiring compatbility mode, including, yes, Google.com.

  • http://keryx.se itpastorn

    1. Saving 18 bytes is not important, unless that will bring you down 1 TCP segment (or 1 IP fragment), since the time to transmit 1 packet in a (networking) frame is not really affected by frame size. So how many IP-packets of 1500 byte-length, where 40 bytes are TCP- and IP-header data, is your page being split up into.

    2. Since 3 TCP segments usually arrive in each window, before an ACK is sent, will an 18 byte reduction mean your page fit in one less TCP-window?

    I.e. going from 4397 bytes to 4379 bytes might be a discernible difference. Going from 4379 to 4361 for sure is not.

    Google’s search page is approximately 2.8 kB. It fits neatly in a single TCP-frame. One could skip using tags like html, head and body (not required in HTML 4.01 or HTML 5) and perhaps a few more things. But getting down to 2.7 kB or even 2.6 kB would not make a discernible difference in any way.

    I hope you all notice that the CSS is not external. Google is applying the principle of reducing HTTP calls. It makes sense for them.

    What one really could start to wonder about is the results page, which is more than 30 kB, and could be reduced by at least 20 %…

    Finally:

    I recently wrote 2 blog posts, that I hope will not be considered link spam, since they address exactly the issues in this article:

    The Value of False XHTML
    http://itpastorn.blogspot.com/2009/07/value-of-false-xhtml.html

    Validation and Doctype Myths and (inconvenient) truths
    http://itpastorn.blogspot.com/2009/06/validation-and-doctype-myths-and.html

  • http://www.cemerson.co.uk Stormrider

    @drivendev – Why would they want to force these requirements on people? If you want to use closing tags and lowercase tags, you can, there is nothing stopping you using ‘XHTML style’ (apart from the closing slash on ‘singleton’ tags obviously). Why does it matter if someone else wants to leave optional tags out and use uppercase?

    The only reason XHTML did this was to make it XML compatible. The document though can still be parsed unambiguously, which is the important thing, and I will be using closing tags and lowercase myself, but I don’t see why it should be forced on everyone.

  • http://www.drivendevelopment.com drivendev

    @Stormrider – Personally I think it matters a lot what HTML programming style people use. Sure, it is nice that people have a choice and can choose what style they prefer but, in my opinion, the inconsistency and ambiguity it leads to are not worth it. My view is that inconsistencies (in almost any scenario, not just HTML) make things more difficult and lead to more confusion. Inconsistent HTML programming styles for example make it harder for developers to collaborate on projects or pick up where other developers left off.

    Requiring a closing tag for some elements but not for others to me is ambiguous. For example, unless the person knows the specific rules for every tag within the HTML5 specification, then they don’t really know for sure whether or not an element requires a closing tag. With XHTML however, the rule is very simple: every tag needs a closing tag and this rule goes a long way in taking away any possible ambiguity and leads to documents that are more consistently-formatted. Similar issues arise with other style differences such as whether or not to use attribute quotes, letter case choice, etc.
    In my humble opinion, XHTML did a great job of making the web more consistent. So why not carry over some of these simple rules that are enforced in XHTML and enforce them in HTML5 so that we can all be on the same page?

  • NickPaul

    I can’t imagine leaving tags open, seems confusing, I’ve only ever known XHTML.

  • http://www.brothercake.com/ brothercake

    I think google’s priorities are different for their search results page – they want wide legacy support, with a decent visual appearance in as many devices and platforms as possible. That’s why they still use font tags and layout tables, because degrading to plain semantic content isn’t acceptable.

    Or maybe it’s propaganda – after all, the one thing Google definitely doesn’t want is a semantic web. Tag soup is their business. Maybe by continuing to use tag soup they’re implicitly promoting it :D

  • fproof

    So Google saves 18 bytes by omitting closing body and html tags, but wastes many more by using <font> repeatedly?

    I’m not so sure if they waste bytes by using the <font> tags after all. Already tried to rewrite the code with less characters, and get the same result?
    ‘class=””‘ already counts as much characters as size=-1, and then you still need to define your css. Also, the css equivalent of size=-1 would be font-size:small, which is much longer. You can’t use the shorter <p> tags either cause then they’d have to reset the default browser styles first.

    So it doesn’t seem that obvious to me. Someone in for a challenge? ;-)

  • http://www.cemerson.co.uk Stormrider

    @drivendev – But they AREN’T ambiguous. The documents can be parsed unambiguously, with closing tags or not, that is the whole point. Different tags can have different attributes, different tags can be contained within it, I see no reason why ‘does it need a closing tag’ shouldn’t come under the umbrella of ‘learning HTML’.

  • Ryan Wray

    @fproof

    While true you might not be able to save many bytes, a CSS stylesheet can stay cached for longer. Whereas a HTML page tends to change more frequently and hence not be as cached as long.

    So while the initial payload of a CSS stylesheet may more, you can save in investment.

    Of course, using class=”*” and such take up bytes, as you said. However, CSS selectors are pretty powerful, and more byte saving methods could be developed (id=”a” or select based on location of element).

  • fproof

    @Ryan Wray

    You’re right for most of the websites, but I think the Google page is pretty exceptional and the html rarely changes.

    Of course, using class=”*” and such take up bytes, as you said. However, CSS selectors are pretty powerful, and more byte saving methods could be developed (id=”a” or select based on location of element).

    For that I think it would be a nice challenge to try and do better ;-)

  • ravi_k47

    Standards are just rules.Sometimes even google or yahoo will break a few.
    We cannot expect to build a 100% validated site and run the statistics and all without considering a few exceptions.What matters is that they are exceptionally good when it comes to javascript and usability.

  • djbaxter

    They’re not even rules. They represent a set of suggested guidelines which are not universally agreed to and which are still evolving. I find discussions about deprecated terms particularly irritating, given that most of these are widely used not only by hobbyists but by major sites.

  • http://www.brothercake.com/ brothercake

    You’re quite wrong – they are rules.

    They may not be rules you agree with or choose to follow, but they are rules nonetheless.

    That’s the point with deprecated features – the standard says not to use them. The fact that lots of people ignore this doesn’t change the fact that the standard says not to use them.

  • djbaxter

    @brothercake: Really? W3C refers to them as “Guidelines” and “Specifications”, depending on the topic.

    I don’t see anything anywhere that even hints (a) that you are “breaking a rule” if you choose to use tables for positioning or “B” instead of “Strong”; or (b) that there is even universal acceptance of those guidelines.

    I also don’t see even the strictest of browsers refusing to render web pages that don’t follow those guidelines. And I don’t expect to.

  • xtence

    i think it’s funny goolge lacks of closing two important tags for saving bytes and then uses font-tags, count and weep google, this uses more bytes than those other two

  • http://www.ajk.co.za AJKock

    I found it a bit hypocritical that a company judges my “adherence to standards” when they rank my website, but do not follow standards themselves.

  • www.ajb2k3.co.uk

    I’ve just spent 2 days arguing with a person that says XHTML isn’t html (go figure) anyway I will always close tags to XHTML standards as it looks allot better as others said.

    If I didn’t know better I would say this incorrect grammar thing was something drawn up by the British gov so as to prevent discrimination against those who can’t be bothered with proper grammar.

    BTW I am British and fed up with this stupid non discrimination crap.

  • http://www.brothercake.com/ brothercake

    I also don’t see even the strictest of browsers refusing to render web pages that don’t follow those guidelines.

    You would if you served your pages as XML.

  • arts-multimedia

    I use closing tags because it is indeed easier to sort out problems.
    In scripting, you can omit curly brackets when an “if” statements remains on the same line, but I do always use open and closing curly brackets because it indicates clearly where a block of code starts and where it ends.
    It’s a matter of creating readable code for me.

    I don’t mind that Google uses FONT tags or CENTER. As long as it works, why not?
    It is all just a convention. Purism in whatever discipline is disease.
    I rather like to use CSS myself, but that doesn’t mean that using html to format a page is forbidden, is it?

  • Petit

    It is true that browsers are and should be forgiving. That was the rule from the start, the rational being that more people should have the chance to start publishing on the web. That happened, so it was a success. Standards has grown out of the fact that it makes we sites easier to maintain and extend.

    Good tools have evolved over the years, making knowledge of (x)html no requirement for writing and publishing. If all web publications adhered to standards like XHTML, Unicode and MIME, the browsers could be made simpler and the automatic treatment of vast amounts of web documents would be possible.

    XML is a standardized way of marking up content in a way that is machine readable and fairly human readable. So XML is *not* a markup language. XHTML is a markup language for the web, that follows this standard. HTML is another markup language for the web. The different versions of HTML are markup standards, that are a bit less stringent, and therefore used in a few different ways.

    The stricter XHTML, served under the correct MIME type has the huge advantage, that you know what to expect and where to find different types of content.

    While HTML has a tendency to mix markup for content,&ltdiv&gt, &ltp&gt, and markup for style &lt FONT …&gt, XHTML is for content only and gives meta information about the content. Style information is given in separate style documents. I find this logical as well as practical, and the reason for less strict markup, as well as for the mix, are long gone.

    I’m not policing here. Well defined and implemented standards are simply more practical. Let’s hope Javascript is coming to that point as well. ECMA is well defined, but implementation has some way to go. The same can be said for CSS, where the interpretation still differs between browsers.

    So, keep the standards and work to get common interpretations and implementations.

    Get my few cents!
    /Petit

  • Petit

    It is true that browsers are and should be forgiving. That was the rule from the start, the rational being that more people should have the chance to start publishing on the web. That happened, so it was a success. Standards has grown out of the fact that it makes we sites easier to maintain and extend.

    Good tools have evolved over the years, making knowledge of (x)html no requirement for writing and publishing. If all web publications adhered to standards like XHTML, Unicode and MIME, the browsers could be made simpler and the automatic treatment of vast amounts of web documents would be possible.

    XML is a standardized way of marking up content in a way that is machine readable and fairly human readable. So XML is *not* a markup language. XHTML is a markup language for the web, that follows this standard. HTML is another markup language for the web. The different versions of HTML are markup standards, that are a bit less stringent, and therefore used in a few different ways.

    The stricter XHTML, served under the correct MIME type has the huge advantage, that you know what to expect and where to find different types of content.

    While HTML has a tendency to mix markup for content,, , and markup for style , XHTML is for content only and gives meta information about the content. Style information is given in separate style documents. I find this logical as well as practical, and the reason for less strict markup, as well as for the mix, are long gone.

    I’m not policing here. Well defined and implemented standards are simply more practical. Let’s hope Javascript is coming to that point as well. ECMA is well defined, but implementation has some way to go. The same can be said for CSS, where the interpretation still differs between browsers.

    So, keep the standards and work to get common interpretations and implementations.

    Get my few cents!
    /Petit

  • Melissa

    I’ve started using HTML 5 in some of my projects, and yes, I insist on closing every tag the XHTML way, because I find it makes it easier to read and debug, and because it seems logical: start something, show something, finish something.

    Like many companies, [Google are] not overly worried about standards. They just want it to work so they can release it as soon as possible.

    That’s what I thought as well. Just because a website is popular doesn’t mean that it should be an example of good coding.

    There have been many, many tutorials and articles written on how and why we should create a good (X)HTML document, and I believe that has been the biggest driving factor towards a more standards-compliant web.

    Again, we will need the leaders in the web industry to step forward and encourage good coding practices using HTML 5.

  • Petit

    Sorry, trouble with the recommended &lt etc. escaping.
    Please delete my second posting and this one :/

  • Justen

    Personally I’ll continue to use close tags in HTML5. Validators, particularly HTML Tidy, are a huge help in diagnosing layout and markup issues, so I try to comply as much as I possibly can with them to narrow down the list of potential issues. I also prefer the XHTML syntax visually while reading code. I am glad the XHTML 2 spec got shut down though, personally – while it had some attractive features I think HTML5 is going more in the right direction in terms of practical tools for web application developers like myself.

  • Justen

    One thing to note is that Google strives to be as universally usable as possible – that means anticipating situations where not even CSS 1.0 is fully supported, so some depreciated presentational tags make sense. For most of us this is not an issue – we are not creating search engines used by billions of people around the world. In that case, it just makes sense to conform to standards and best practices for our own sanity. This should become apparent to the first designer who has a client decide halfway through implementation that he wants times in size 12 instead of palatino in 14 and, depending on his methodology, either has to change 2 dozen font tags on each page or change one line in a stylesheet.

  • Raven-X

    I prefer the strictness of xhtml. But if we only have HTML to use, just utilize some discipline along with it. Take the principles from xhtml and apply it to html. HTML and XHTML do have different “purposes” but they’re close enough so that you can apply discipline if you switch from one to the other.

  • Dorsey

    I would like to know what you can do wrong and still get IE to render properly. I don’t know how many hours I’ve spent trying to find a missing closing tag that threw IE completely off and royally screwed up the layout. I’m not alone – every now and then I see a stray ‘<‘ on other web sites.

  • petweis

    I am overjoyed to see Google use the common sense {br} [ don't render here] instead of the totally superfluous nonsense of {br /} – which wastes tons of time and energy in putting it there, in storing it on the computer, in transmission to a server, storing on a sever, sending from a sever, and rendering in a visitor’s browser. While less than infinitesimal by itself 50 {br /}’s on pages rendered several quadrillion times every day amounts to a large chunk of energy, and all of it a total waste.

    Same with {strong} instead of {b} and {em} instead of {i} – and all the other superfluous time and energy wasting nonsense.

    As for the deprecating crowd, it appears that they are not aware that to deprecate means “to bad mouth” – to speak ill of something, or someone. Ironically, this is exactly what is going on.

    Same goes for the nonsense that tables can only contain tabular data. Tables have 2 familiar elements; cellpadding and cellspacing. And last time I looked, and in real life, cells can and do contain, well, everything under the sun. Prison cells, for instance, contain one or more prisoners, a cot, a sink, a toilet, perhaps a shelf on the wall, and even a TV in the better class of jails. Cell phone cells typically contain an areas of about .5 to 2 square miles in urban areas, and as much as 50 sq. miles in the country, with commercial and residential highrises, houses, apartments, condominiums, roads, lanes, bridges, stores, shops, hordes of sparrows, pidgeons and people, countless pets and inumerable pests, in short, everything under the sun, including vast acres of kitchen sinks – and at least in many cases, web site development studios or offices. Any web site development office with a cell phone is in such a cell. Biological cells contain the machinery of Life, and in aggregates, make up all the living things on this Earth, from ameoba to our selves. Terrorist cells typically contain any number of terrorists. Finally, rubber lined cells contain mentally challenged people who insist upon beating their heads against the wall.

    I don’t listen to them. I stick anything under the sun in Tables – a brilliantly simple, quick and easy, supremely effective, wonderfully stable, essentially infinitely extendable system of sectioning web pages — which is so easy that is is well within the capacity of the average ten year old after been shown once – and best of all, can be read by any browser ever made. And it saves me tons and tons of time. Fiddling for 3 hours to get a simple 3 column lay-out right in CCS can be done in 15 minutes in a Table. And it’s done; works in every browser; and doesn’t fall apart at the slightest touch.

    There is hope though; the latest CSS specs contain – guess what, the much bad mouthed “tables” – although still within the castrating single smoke stack sectioning of CSS.

    Not using Tables to section web pages is like saying – exactly – that a bulldozer can only be used to doze bulls, and that you got to bring down a burnt out building and level the lot with a lawn rake instead – with a tool designed to address the style of a web page. That you are supposed to do structure with a styling tool does not appear, strangely enough, to offend the semantics people in this instance. Go figure.
    May God have mercy upon them – but mostly us.
    cheers, Peter;

  • petweis

    that should read “sharp brackets do not render here”. Had to use the curly ones instead. Sorry about missing that.
    cheers, Peter;

  • http://www.silklink.co.uk silklink

    My preference is to close tags, as this, for me, makes my life easier when debugging – as suggested by many views so far. However, I can see the benefit of not having to include extra code to close tags on larger sites like Google. Essentially, an opening tag is the closing tag of the previous tag, so adding a strict closing tag is perhaps unnecessary. ?Teaching old dogs new tricks?

  • http://fvsch.com Florent V.

    petweis, i’m sorry but to me your whole comment is content-free sophism. Refering to prison cells to talk about the purpose of HTML table cells, seriously? You urge people to stay sensible and practical in their use of HTML — could you maybe do the same with your use of rhetorics?

    Regarding tables in HTML:

    – The standard (at least since HTML 4, i’m not sure about 3.2) says it’s for tabular data. Note that this is a semantic issue, so a non-semantic use of tables (for layout for instance) may still be valid in HTML 4 or 5.
    – People have used tables extensively for layout, because they were the only practical solution. Now they’re one of two practical solutions (the other being a set of CSS positioning properties and techniques) to some layout problems. Sometimes they’re better (easier to learn and use), sometimes they’re more limited that what some CSS can achieve. People who happen to know their CSS tend to use CSS positioning more (in order to keep the HTML code leaner), and tables only for very specific layout issues that cannot be solved easily with CSS positioning. But i understand that beginners or people who are not front-end developers may want to learn table layout only: it’s less powerful, but it requires less work.
    – One practical and sensible way to look at the use of HTML tables for layout is looking at it from an accessibility standpoint. Accessibility guidelines don’t say you can’t use layout tables, they just say you should use them in a way that doesn’t hinder user access to content. In a nutshell: avoiding nested tables, making sure tables can be linearized correctly, and avoiding to use semantic table elements and attributes (summary, scope, th, caption…) for layout tables.

  • http://fvsch.com Florent V.

    Lately it seems that standards are dictated by big companies. Which means the standard-authorities cannot work independently.

    The W3C is a consortium. Which means it’s funded by big companies. The actual work on the specs is done by big companies. W3C staff (not a lot of them) mostly work on enforcing the W3C process (methodology and requirements) and on the set of tools used by specification authors and contributors.

    So it’s not “lately” that W3C standards are dictated by big companies. It’s always been like that. Although it’s not one big company dictating a spec, it’s several companies (all those interested in some technology proposal) working and battling together on a spec.

    Welcome to the world of industry standards. The way it works may seem counter-productive, but it’s actually better like that. Believe me, this is way better than government-driven standards. :/

  • Anonymous

    I was once asked to go over some templates which were created for the purpose of being a standard template for over 20 websites. The templates were not documented, they lacked proper indentation, tags written however, using inline, embedded and external CSS and deprecated tags. These templates were created by a web development company for other developers to use as a base. Suffice to say, they were not used.

    It is all well and good as an individual developer or a person doing a personal site to code as you feel like and use tables for everything. When you work as a team, the reality is, it is pure stress to have to take someone’s badly formatted code and work with it, especially in a situation where you have to work with a site with heaps of nested tables or loads of unnecessary badly named divs and spans.

    I worked at a company where the senior developer did just that, I was the one who had to troubleshoot and apply CMS systems to the sloppy code he wrote and he refused to learn how to make his code neater. If we all used XHTML guidelines, it would have been way less stress. They are alot of web developers who actually know very little about web development standards and guidelines furthermore the proper usages of the very tags they use, I was one of these people a few years back and coming from that background I prefer XHTML.

    That being said, the final decision is up to the individual person or company. No matter what the “standards” are, I will always have my own standards of coding.

  • http://www.katzenbergdesign.net Katzenberg

    In MY browser the Google Page does close the HTML and Body tag. In the .com version as well as in the German version?!?

  • Anonymous

    Is it possible to create a complete client side application using HTML 5 (it will embed chat clients, stock ticker) + javascript, and then bundle is with underlines Firefox 3.5 engine, so that user can install it as a desktop app on linux, and then it runs in own window using firefox 3.5 engine. The app will store everything in localstorage – like urls, usernames etc, and will interact with any local server.

  • petweis

    Re: Florent V. – Sorry, young fellow, but in my view every item in my comment boils down to much wasted time and energy, and to the bottomline of money, income, profit, lower costs – including unnecessary burdens on the environment, and hence, the quality of our lives. And this is as concrete as it can be.

    As for standards, if they waste time and energy, particularly when far less wasteful solutions are readily available, they not only deserve to be ignored, but they should be fought against. I applaud Google for, hopefully, establishing standards which do not waste time and energy. For Google – given its Googolplex volume – anything that does not absolutely need to be there is a major concern in terms of time, energy and money. And if Google leads the way in getting rid of superfluous and nonsensical items [i.e. {br /}, {strong}, {em}] and other such nonsense, we, the whole industry, and our planet will benefit from it.

  • Parry

    Non-strict HTML! Wonder how cross-browsers will have to deal with the non-closed tags. Been writing so much of strict HTML for so long. I will find it messy. I never find it hard to write a strict HTML and its never a waste of time than debugging and solving cross-browser issues.

  • DizzyDevil

    the classic Google Search page — labels itself as HTML5

    It does? I’ve never seen a Google page, search or otherwise, with a declared doctype. Seems to me that they could give a rats a** about standards and are perfectly happy letting the browser figure it all out. Am I missing something here?

  • Arlen

    I promised myself I’d stay away from the HTML5 discussions, but after I read this I couldn’t help myself.

    Your question: “So, will HTML5 mark the beginning of a drift away from standards and the importance of validation?” might actually have a point if Google validated *before* HTML5, and it was during the switch to HTML5 that it stopped validating.

    If you’re seriously looking for an answer to the question, rather than just stirring the pot, then:

    1) Adhering to HTML5 cannot possibly represent “a drift away from standards” since, by definition, if you code to HTML5 you are FOLLOWING a standard. It’s a drift away from past standards, yes, where the practice was to come up with a standard that no one would implement properly. (Check on how XML errors are supposed to be handled, and compare that to how XHTML errors are handled in the real world.) In the case of HTML5, the emphasis was placed not on some castle in the sky, but on floor plans that the builders could and would actually follow.

    2) There’s a validator for HTML5, and people are encouraged to code according to the standard (and that code can be validated). If someone writes HTML5 code that doesn’t validate, they’re doing it wrong. Just like with HTML4 and XHTML1. Validation and HTML5 are completely separate issues.

    Seriously, I just don’t get where the heartburn on this subject keeps coming from. You like to close empty elements with the slash. Nothing in HTML5 prevents you from doing that. You want to close your P tags. Again, no one’s saying you shouldn’t. (Personally, I find the closing slash unnecessary, but I *do* close my paragraph tags — though I understand the rationale for not closing them, I just prefer to close them.) HTML5 isn’t even making you have to give up XHTML syntax. It’s all right there, Most XHTML1 Strict documents will validate fine as XHTML5 (or even HTML5) documents, as HTML5 is mainly a superset of 4.01, and XHTML1 was just a XHTML incarnation of HTML 4.01.

    Since very few people were actually using XHTML properly (but instead were serving XHTML as HTML to user agents that interpreted XHTML as HTML) there will be few if any changes needed to make old pages conform to the latest spec.

    It’s interesting that 90%+ of the objections I’ve seen about HTML5 relate not to the objector’s code but to other people’s code. Why should it be the job of HTML5 to make other people code like I do (assuming I follow good practices)? Isn’t that what education is for?

    To give a more real-world example: the C language (or for that matter, almost every programming language) allows you to write code in the most obfuscated and bizarre manners imaginable; the code still executes and delivers the proper result. But when we teach it, we teach proper coding practices, and every development shop has some “house style” rules that will vary only a little from those practices. Yet no one cries that the programming world is going to seed when a new language (or revision to an existing one) comes out that doesn’t *require* the coder adhere to those good practices.

    The point isn’t whether HTML5 will let you get away with bad markup. So long as the user is involved, and content is generated by non-professionals, bad markup will be with us. The user agents need to be able to handle it. The point is whether you can write good semantic HTML5 markup. And you can.

  • streetshark

    Something just occurred to me. I use a lot of CSS. If I were to program a paragraph tag with a class command in order to make one paragraph stand out among the others, wouldn’t I need to close that paragraph so the programming would end with the closing tag?

    Just a thought.

    Streetshark

  • Arlen

    @streetshark,

    Depends on what follows the omitted paragraph closing tag. A paragraph contains “phrasing content”, and so the paragraph ends when the first content is encountered that doesn’t fit. Since the user agent closes the tag at that point, and the user agent is what applies the style, there’s no hangup.

    It’s all in the way CSS is applied. It’s not applied based on the raw text in the html file, so any missing text markers there are only relevant if the user agent cannot parse the text. The user agent constructs a document tree from the text, and only then is the style applied, to the node(s) of the document tree. So if the user agent parses the text properly, according to the spec, there’s no issue.

    Of course, a bug in the user agent could cause you problems there. But, then, UA bugs are *always* a hassle.

  • http://www.sitepoint.com AlexW

    @DizzyDevil

    It does? I’ve never seen a Google page, search or otherwise, with a declared doctype. Seems to me that they could give a rats a** about standards and are perfectly happy letting the browser figure it all out. Am I missing something here?

    One of the nicest things about HTML5 is the doctype declaration is short, elegant and memorable. < !DOCTYPE html>

    http://dev.w3.org/html5/spec/Overview.html#the-doctype

  • arts-multimedia

    Adhering to HTML5 cannot possibly represent “a drift away from standards” since, by definition, if you code to HTML5 you are FOLLOWING a standard.

    Arlen,
    I couldn’t have expressed it better then this :-)

  • apatole

    Someone in the post said that standards are defined by big companies & how true that is we can see. So much of energy & resources are spent on just deriving new things when they are still not able to standardize the browser & how they render the page. A simple list would render differently in different browser. I think there must be some effort for all browser manufacturers to accept a standard & save developers some time n energy to be put in constructive work.

  • troll

    I just don’t want government getting in the way of me and my html.