HTML 5.1 taking its last step before becoming "the standard"

Sep 21, 2016 21:05 GMT  ·  By

Members of the World Wide Web Consortium (W3C) are getting ready to launch the HTML 5.1 specification and have already started work on the upcoming HTML 5.2 version since mid-August.

The HTML 5.1 standard has been promoted from a "Release Candidate" to a "Proposed Recommendation," the last step before it becomes a "W3C Recommendation" and officially replaces HTML 5 as the current HTML standard.

As a Proposed Recommendation, HTML 5.1 is practically locked against major changes, and outside small tweaks here and there, we are currently looking at a 99.99 percent version of the upcoming HTML 5.1 standard.

The vote to promote HTML 5.1 from RC to PR was approved in unanimity, a clear sign that major browser makers have reached a general consensus on what the standard should look like, and what they should be implementing in their browsers in upcoming versions.

New HTML 5.1 features

As for the standard itself, there are a few features you can get excited for. They're not as many as when HTML5 was released, but that was a groundbreaking release that has literally changed the entire Web-Dev ecosystem when it was launched, together with CSS3.

The main three features that are really interesting are the < picture >, < dialog >, and the < summary > & < details > combo tags.

< picture >

Let's start with the first. We all remember the social media push to make the < picture > tag a part of HTML5. Unfortunately, the campaign was too late to catch a train with the HTML5 spec, but the WHATWG group picked up the slack, and through hard work from browser vendors, the tag is already implemented and has shipped in Chrome, Opera, Firefox, Safari, and Edge.

Technically, all browsers already honor this tag, and W3C is only making it official by adding the < picture > tag into the HTML 5.1 standard's text.

The new HTML 5.1 spec not only includes the < picture > tag, but also the srcset attribute, which goes hand in hand with the first and already are a developer's favorite tools for supporting responsive images on their sites.

If you'd like to get acquainted with the new tag, you can find all the tutorials you want on the Responsive Images website.

< dialog >

Another self-explanatory tag is the < dialog > tag, currently supported only in Chrome and Opera, and labeled as "under consideration" by the Edge team.

This new tag will let developers create dialog windows (popups) inside the HTML code, with less JavaScript code than before.

You can pass anything you like inside a < dialog > tag, from text to images, and in theory, this tag should be the death of all those "lightbox" and "modal" plugins that have flooded the open source ecosystem since the mid-2000s.

< summary > & < details >

These two tags work together, and the (unconfirmed) rumor is that they were added to simplify the creation of collapsible elements.

We've seen many developers in the past employ HTML tags in never-before-seen ways, so don't be surprised if you see them used for some other UI widget as well.

Currently, < summary > & < details > are supported and have shipped in Chrome, Opera, Firefox, and Safari. The Microsoft has these two tags as "under consideration," but we doubt this won't make it in their browser after W3C officially releases HTML 5.1.

Other HTML 5.1 features

A less important feature also added in HTML 5.1 includes the HTMLElement.forceSpellcheck() method that can be used to enable or disable the browser's built-in spellchecker for specific form elements, such as textareas, input fields, and areas with contenteditable enabled.

HTML 5.1 will also feature support for the allowFullScreen attribute, which will tell browsers which elements are allowed in fullscreen mode or not. This attribute will only work for < iframe > tags.

Other less important features include the ImageBitmap interface, the XMLDocument interface, the registerProtocolHandler() method, and the registerProtocolHandler() method.

When it began developing HTML 5.1, the W3C started with a list of features it would have wanted browser makers to implement. The features that W3C wanted in HTML 5.1 but browser makers failed to implement by now are labeled "at risk."

These features will ship with HTML 5.1, but their "at risk" status means they'll be removed in HTML 5.2 if browser makers don't support them properly, or if developers don't use them.

HTML 5.1 "at risk" features include the < menu > and < menuitem > elements, the datetime-local value for the type attribute of the input element, the < keygen > element, and the use of text tracks to expose in-band metadata.

Work on HTML 5.2 has already begun

Since things look set for HTML 5.1, and only a formal release is expected in the coming weeks, W3C members have already started work on HTML 5.2.

There are two major features in this new HTML5 specification, and those are the the < meta name="theme-color" > definition and the addition of support for < script type="module" >.

The first will allow developers to set the dominant color of a web page, which can then be picked up by scripts or browsers, and used for other operations. Think of the way Vivaldi changes the UI toolbar's colors when navigating from site to site.

The second feature is related to the ever-evolving JavaScript ecosystem, which is slowly moving towards a modularization of every piece of JS code loaded on a page. But this is another story for another time.

You can read more on HTML 5.1 here, the changes and support table here, and the HTML 5.2 specification draft here.