Anne van Kesteren
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…
text/html
MIME typeTell me more about those features!
DOCTYPE
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!doctype html>
<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>
canvas
drawing applicationcontenteditable
attributeRich text editing in HTML!
Yay! Code used:
<p contenteditable="true">…</p>
datagrid
elementmeter
and progress
<meter>max: 100; current: 75</meter>
<progress><span>0</span>%</progress>
with the span
element being updated by a scriptvideo
and audio
elementsSince applications need APIs…
HTML5 has added some…
Thank you!
whatwg.org
w3.org/html
html5
"