HTML5

Incremental Improvements to the Web

Anne van Kesteren — Opera Software

31 May 2007 — reboot 9.0

95% of the web is HTML

We accumulate lots of information in HTML

95% of the HTML is syntactically incorrect…

Close to nothing is conforming…

A century from now all information could become inaccessible…

How do we solve this mess?

Who's doing HTML5?

What the hell is HTML5 anyway?

What is HTML5 for?

How does HTML5 work?

Tell me more about those features!

The DOCTYPE

<!DOCTYPE html PUBLIC
  "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!doctype html>

Character encoding

<meta
 http-equiv="Content-Type"
 content="text/html;
          charset=utf-8">
<meta charset="utf-8">

Better document structure…

<section>
<nav>
<article>
<aside>
<header>
<footer>

Better typed form controls…

<input type=email>

<input type=date>

<input type=url>
<input type=number>

<datalist>: Google suggest

<input name="q"
       list="suggest"
       oninput="list.data = '?p=' +
                encodeURIComponent(value)">
<datalist id="suggest"></datalist>

Declarative form validation…

<input required>
<input pattern=[a-z]>
<input type="range"
       min="2"
       max="40"
       step="2">

HTML5 does more though…

canvas element: img, but scripted…

Used on Y! Pipes…

<canvas width="150" height="200" id="demo">
 <!-- fallback content here -->
</canvas>

<script type="text/javascript">
 var canvas = document.getElementById("demo"),
     context = canvas.getContext("2d")
 context.fillStyle = "lime"
 context.fillRect(0, 0, 150, 200)
</script>

Simple canvas drawing application

contenteditable attribute

Rich text editing in HTML!

Yay! Code used:

<p contenteditable="true">…</p>

datagrid element

meter and progress

video and audio elements

Since applications need APIs…

HTML5 has added some…

APIs

What's next?

Shameless plug

Thank you!

Any questions?