HTML5 Introduction

What is New in HTML5?

The DOCTYPE declaration for HTML5 is very simple:

<!DOCTYPE html>

The character encoding (charset) declaration is also very simple:

<meta charset=”UTF-8″>
HTML5 Example:
<!DOCTYPE html>
<html>
<head>
<meta charset=”UTF-8″>
<title>Title of the document</title>
</head><body>
Content of the document……
</body></html>

Try it Yourself »

The default character encoding in HTML5 is UTF-8.


New HTML5 Elements

The most interesting new HTML5 elements are:

New semantic elements like <header><footer><article>, and <section>.

New attributes of form elements like number, date, time, calendar, and range.

New graphic elements<svg> and <canvas>.

New multimedia elements<audio> and <video>.

In the next chapter, HTML5 Support, you will learn how to “teach” older browsers to handle “unknown” (new) HTML elements.


New HTML5 API’s (Application Programming Interfaces)

The most interesting new API’s in HTML5 are:

  • HTML Geolocation
  • HTML Drag and Drop
  • HTML Local Storage
  • HTML Application Cache
  • HTML Web Workers
  • HTML SSE

Tip: HTML Local storage is a powerful replacement for cookies.


Removed Elements in HTML5

The following HTML4 elements have been removed in HTML5:

Removed Element Use Instead
<acronym> <abbr>
<applet> <object>
<basefont> CSS
<big> CSS
<center> CSS
<dir> <ul>
<font> CSS
<frame>
<frameset>
<noframes>
<strike> CSS, <s>, or <del>
<tt> CSS

In the chapter HTML5 Migration, you will learn how to easily migrate from HTML4 to HTML5.