New HTML 5 tags in old browsers




The problem

HTML 5 is the new version of HTML, which is coming. Though it hasn't been officially implemented, there is already parts of it that modern browsers can use. The Internet has changed a lot since the birth of HTML 4, and an update with new functionalities has been necessary.

Unfortunately, no everybody get their browsers updated to the latest version, despite that they are free. For some there is a legitimate excuse, e.g. if you use Windows XP and Internet Explorer because here you only have version 8 or earlier available. For the most part, unfortunately, it is just a lack of understanding in regards to safety when navigating the net or reactionary company IT policies.





Workaround at styling

If you just have to style your tag, your workaround consists of two parts. If we use the NAV tag as an example, then it can be specified in the style sheet, which for most people is a cascading style sheet (CSS):

NAV {
display: block;
}

Besides from this, you can of course style with colors, fonts, etc.

We have now defined the element, so the pages can use it, but because the element does not exist for old browsers, and old version of Internet Explorer don't allow unknown elements, the element has to be created first. This requires a JavaScript with the command createElement, i.e. if you need the NAV tag to work in older versions of Internet Explorer as well, you write in the HEAD tag:

<script type="text/javascript">
document.createElement('NAV');
</script>

This piece of code is needed on all pages using the NAV tag.