Electronic Design
What's The Difference Between HTML 4 and HTML 5

What's The Difference Between HTML 4 and HTML 5

World Wide Web Consortium's (W3C) HTML 5 is the wave of the future even though it is still a work in progress. It is designed to replace the HTML 4.01 standard although HTML 5 is backwards compatible. HTML 4 and its earlier incarnations were extended using JavaScript and a host of plugins including Adobe's Flash to provide interactive and multimedia presentations. HTML 5 specification is designed to bring all of that functionality into a single, unified platform.

HTML 5 is important to embedded developers because HTML 5-capable devices like smartphones and tablets will be the norm for controlling embedded devices. The ability to deliver a portion of an embedded device's control program via HTML 5 will allow embedded developers more flexibility.

HTML 5 can also utilize other standards such as W3C's CSS3 (cascading style sheets). For multimedia presentation, the Khronos Group has defined WebGL (Web-based Graphics Library). WebGL extends JavaScript allowing access to 3D graphics hardware. This is something that could only be done requiring special plugins with HTML 4.

New Features

One of the most obvious differences between HTML 4 and 5 is the move to identify the type of information contained within a page. An HTML 4 page typically contained a large collection of

elements that would often be identified using id or class attributes. This allowed matching of CSS (cascading style sheet) styles to the data for presentation purposes. It was possible to analyze the contents of a web page using this information as well but there was no standard making each website an island of information that could be viewed.

HTML 5 provides standard elements like

(Fig. 1) that allow content to be identified using common tags. This allows a typical web page with a header, footer, article and nav sections to have the same specification across different websites. This makes programmatic processing of a web page easier. Some of the new element types include