Skip to navigation
Analysis

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?

In a nutshell, HTML5 is the latest version of HTML – the language in which web pages are written. HTML5 differs from earlier versions by introducing new elements, updating the meaning of others and deprecating a handful. The HTML5 specification also defines new JavaScript features that can be used in conjunction with new HTML elements.

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.

Native multimedia

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.

1 2 3 4
Subscribe to PC Pro magazine. We'll give you 3 issues for £1 plus a free gift - click here
User comments

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.
Andy.

By AndyChips on 13 May 2013

Leave a comment

You need to Login or Register to comment.

(optional)

For more details about purchasing this feature and/or images for editorial usage, please contact Jasmine Samra on pictures@dennis.co.uk

advertisement

Latest News StoriesSubscribe to our RSS Feeds
Latest Blog Posts Subscribe to our RSS Feeds

advertisement

Sponsored Links
 
SEARCH
Loading
WEB ID
SIGN UP

Your email:

Your password:

remember me

advertisement


Hitwise Top 10 Website 2010
 
 

PCPro-Computing in the Real World Printed from www.pcpro.co.uk

Register to receive our regular email newsletter at http://www.pcpro.co.uk/registration.

The newsletter contains links to our latest PC news, product reviews, features and how-to guides, plus special offers and competitions.