Getting started with HTML5
Posted on 8 May 2013 at 10:23
Feeling confused about HTML5? Ian Devlin looks at the origins and features of the technology, and how you can learn more about it
No doubt you’ve heard of HTML5; but you probably haven’t seen a clear, accurate explanation of what it is, what it contains and what it can do. The term HTML5 is widely misused as an umbrella term for all sorts of technologies, some of which have no connection to the standard at all. If this has left you a little confused, it’s understandable.
In this feature we’ll give you an introduction to HTML5, showing you what it consists of and what you can do with it. We’ll also look at other technologies often mistakenly referred to as “HTML5 technologies”.
What is HTML5?
Unlike previous versions of HTML, HTML5 wasn’t created by the World Wide Web Consortium (the W3C). Its origins lie with the independent Web Hypertext Application Technologies Working Group (WHATWG), formed in 2004 by delegates from Apple, Mozilla and Opera who disagreed with the W3C’s vision of XHTML as the future of the web. The WHATWG created proposals to develop the web as a platform for applications – and within a few years the W3C adopted these proposals. The two organisations now develop and maintain HTML5 together.
It’s worth noting that each organisation has its own version: although the two are very similar, the WHATWG’s is a “living document” that’s regularly tweaked, while the W3C’s is maintained through more formal processes.
New elements in HTML5
Many of the updates HTML5 has brought are intended to make life easier for developers. A case in point is the HTML5 use of DOCTYPE. Prior to HTML5, the syntax you had to use to tell the browser what sort of HTML you were using was unfriendly to say the least; for example, the first line of an HTML 4.01 page might be:
Today, to specify HTML5, you simply need to define:
HTML5 also includes a new “charset” element that defines the character encoding of your web page – a useful feature on the increasingly multilingual web. For example, to define the default character encoding of your page as UTF-8, you can simply place the following line within the head element:
New semantic elements
HTML5 focuses on making code easier to understand, navigate and customise. To this end, it introduces several semantic elements that weren’t included in previous versions of the standard. For a start, since many web pages have headers and footers, HTML5 includes new <header> and <footer> elements, specifically for enclosing content intended for these roles. Another common feature of web pages is a list of navigation links, so again the HTML5 specification defines a new <nav> element to enclose lists of navigation links.
When it comes to the main content of a web page, the <article> and <section> elements can be used to enclose content and give it a particular semantic meaning. To get an idea of how these elements can be used, consider a newspaper with several sections, such as news, sport and entertainment. Each section contains a number of articles that are related by the section heading, but each of which can also stand on its own.
One of the most important – and most talked about – things that HTML5 allows you to do is build multimedia directly into your web pages. Previously, in order to add an audio or video file to a web page, you had to use an <object> or <embed> element to call a third-party plugin such as Adobe Flash to play the file. This required that the plugin in question was installed and working on the end user’s machine – something that can’t be taken for granted.
Really useful info
Thanks in particular for explaining the new audio and video tags. It all makes sense now, whereas before your article I was led to believe that HTML5 was a new video format.
By AndyChips on 13 May 2013
For more details about purchasing this feature and/or images for editorial usage, please contact Jasmine Samra on firstname.lastname@example.org
- Windows 10: release date, features, free update and cloud version
- iPhone 6 Plus "less likely to bend than HTC One"
- iPhone 6 Plus: Apple's had nine complaints over "bendgate"
- Does the iPhone 6 Plus bend?
- Adobe buys Aviary to open Creative Cloud to mobile
- iPhone 6 is toughest Apple handset yet
- Ellison steps down: but who's really running Oracle now?
- Amazon releases high-end Kindle Voyage Touch
- Sony warns of massive loss on smartphones
- Dropbox app doesn't work properly with iOS 8
- Windows 10: a step back to go forward
- Michael Dell: Cloud infrastructure is the roads, bridges and highways of the 21st century
- How to check your identity hasn’t been sold to the hackers
- Tim Cook: this is how much TV has changed since the 70s
- Westminster wins the .London battle
- 20 years of PC Pro: from deep pan pizza to virtualisation
- Five reasons why the Apple Watch leaves me cold
- Apple Watch, iPhone 6 and 6 Plus: Tim Cook's Apple back with a bang?
- BT Home Hub 5: how to get maximum speed
- 20 years of PC Pro: one-star reviews (including "the worst tablet we've ever seen")