Having created and run the Highlander courses for the last 3 years, I can see some really useful things on the horizon. HTML5 has been a great step up from HTML4, and there has been, and continues to be, great things created with HTML5, but more is coming. So what is next in HTML5? Well I am talking about Web Components. You can read the spec here…
This actually comprises of…
The Shadow DOM Custom elements Templates HTML Imports
These are all very new, but you can already use them today. However you must use an up-to-date browser. There is already an excellent polyfill called polymerjs:
We know this gives us a calendar.
Date form tag
Looking at this we assume it is made of divs, etc, i.e. standard html tags. But when we look at the source code, all we see is the <input type="date"> tag. So what is going on? Well, within Chrome, if you go to the Developer Tools and go to the options (the little cog in the bottom right-hand corner) and go to General. there is an option called Show shadow DOM.
shadow dom option
Once you have done this, now look at the source code…
with shadow dom enabled
The ability to create your own, custom, DOM elements, e.g. <alex></alex>
Declaring inert DOM subtrees in HTML (document fragments), manipulating them and instantiating them.
Re-using HTML documents within other HTML documents