HTML 5 And Outdated Coding

It seems to me that some of the people involved in defining what should be allowed in HTML 5 haven't thought things through properly as to what various versions of the different browsers do and don't support. They are allowing old obsolete practices dating back to HTML 3.2 and also what used to be proprietary tags into their new standard.

The thing is that the obsolete practices were necessary back before browsers supported the HTML 4 and CSS 2.1 standards properly. Surely any browser that is going to support HTML 5 will have supported HTML 4 and CSS 2.1 many versions earlier and so those obsolete HTML 3.2 practices will not be required to support any browser at all by then and particularly will not be required in any browser that supports HTML 5.

An obvious example of this is the use of HTML tables for layout. This was necessary before the CSS positioning standards were adopted by browsers in order to be able to place things in the required positions within the web page. The CSS display:table, display:table-row, and display:table-cell commands allow the exact same positioning to be applied as would be applied by an HTML table but with the positioning being applied correctly via the CSS rather than using an incorrect tag in the HTML to achieve the same result.

The only problem with being able to do layout tables in CSS rather than HTML is those old browsers that do not support those particular CSS commands - in other words Internet Explorer 7 and earlier (since all of the other browsers that didn't support it are long gone). So provided that you are not trying to support IE7 there is no reason whatsoever for using layout tables in the HTML since you can achieve the exact same layout with only slightly different but far more semantic code by doing the table via the CSS.

This means that the HTML layout table support that these people are proposing should be in HTML 5 will only be necessary to support those browsers that support HTML 5 but which don't support that part of CSS 2.1. Now the other thing to remember here is that the first version of Internet Explorer to even partly support the proposed HTML 5 is Internet Explorer 9. So what these people are proposing is something that will only be necessary to support versions of Internet Explorer that are after version 9 and before version 8 at the same time. Now even just looking at the version numbers it is impossible to see how there could be a version of Internet Explorer that has a number that is both greater than and less than 8 at the same time. Also since browsers tend to not remove support for the code that prior versions supported (even when such code has been defined to be obsolete decades ago) there should be no expectation that IE will ever drop full support for CSS 2.1 and so using HTML tables for layout will never be necessary in any browser that will ever support HTML 5.

Another example of HTML 5 reintroducing unnecessary code is the proposal to make embed a part of the new standard. Now this tag was a proprietary one introduced prior to the standards deciding that the object tag was the appropriate one for the purpose. Now introducing this tag in HTML 5 is an even more ridiculous concept than the table for layout one since even Internet Explorer 7 properly supports the object tag when used for those things that most people use the embed tag for. In fact if you look at the way most people use embed by wrapping it inside an object tag, it is easy to see thatpeople using embed have no idea of how to properly code such tags.

The browsers that didn't properly support the object tag are once again old versions of Internet Explorer. In this instance it depends on just exactly what you are attaching with the object tag as to whether or not the standards compliant object tag will work in Internet Explorer 6 or not. Since most people are using object/embed to attach flash, as long as the browser has a relatively recent version of Flash installed the standard object tag that works for IE7+ and all other modern browsers will also work in IE6 and so simply coding a standard compliant object tag does away with the need for the IE5 proprietary version of the object tag wrapped around embed.

Since anyone running IE6 on Windows 2000 or later will most likely have a recent enough version of Flash installed and since most of the flash being produced these days requires at least that version of Flash in order to work anyway, there is now no point in coding the proprietary version of the object tag for flash. Once you make the minor change to get rid of the classid from the tag it will then work in all modern browsers and no browser will need to use the embed any more meaning that you may as well delete that from your page.

Since the embed will never run in browsers that support HTML 4+ properly, why is it necessary to add it to the standards? There are still some situations where a proprietary version of the object tag is needed in order to be able to link certain types of content into the web page using the object tag instead of a proprietary tag but none of those are ones where embed will work at all.

It seems to me that these people involved in developing HTML 5 are spending too much time looking backwards at the problems that old browsers had and wanting to reintroduce the solutions that those browsers needed even though by the time that everyone is using browsers that actually support HTML 5 those problems will be ancient history.

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate