The document discusses HTML5 and related technologies. It begins with an overview of browser support for HTML5, with over half of web traffic coming from browsers that support basic HTML5 features. It then covers various HTML5 topics in more depth, including new semantic tags, CSS3 styling techniques, multimedia capabilities like video and audio, connectivity features like WebSockets, and 3D/graphics capabilities. Throughout, it provides code examples and discusses browser compatibility considerations for HTML5.
10. Most Flash websites will need
to be rewritten to support
touch. [...] why not use
modern technologies like
HTML5, CSS and JavaScript?
Steve Jobs, April 2010
Scott Stanfield @ Mix’11
55. Multimedia
Audio and video are first class citizens in the
HTML5 web, living in harmony with your
apps and sites. Lights, camera, action!
56. HTML5 Video & Audio
<audio <video
src= src= The url to the audio or video
width= The width of the video element
height= The height of the video element
poster= The url to the thumbnail of the video
preload= preload= (none, metadata, auto) Start downloading
autoplay autoplay Audio or video should play immediately
loop loop Audio or video should return to start and play
controls controls Will show controls (play, pause, scrub bar)
> >
… …
</audio> </video>
Nigel Parker - http://nigelparker.name
57. The browser will use the first recognized format
<video width="320" height="240" controls="controls">
<source src="movie.ogg" type="video/ogg" />
<source src="movie.mp4" type="video/mp4" />
<source src="movie.webm" type="video/webm" />
Your browser does not support the video tag.
</video>
PAGE 57
58. Audio & Video Codecs – Browser Support
PAGE 58
If WebM is
installed
*
! *
!
Chrome is removing support for H.264
Microsoft released a H.264 Extension for
Chrome on Windows 7
* !
Nigel Parker - http://nigelparker.name
59. HTML5 Video Codec
Browser H.264 (MP4) VP8 (WebM)
Internet Explorer 9 X X
Google Chrome 12 X X
Mozilla Firefox 4 - X
Apple Safari 5 X -
Opera 11 - X
PAGE 59
60. Apple’s HLS (HTTP Live Streaming)
PAGE 60
HTML5 doesn’t specify any form of adaptive streaming
Apple’s HLS is not a part of an industry standard
3GPP and MPEG are in the process of standardizing
DASH(Dynamic Adaptive Streaming over HTTP)
Nigel Parker - http://nigelparker.name
61. CSS3 Styling
CSS3 delivers a wide range of stylization and
effects, enhancing the web app without
sacrificing your semantic structure or
performance. Additionally Web Open Font
Format (WOFF) provides typographic
flexibility and control far beyond anything
the web has offered before.
62. Styling Video with CSS
PAGE 62
video {
position: relative;
border-radius:
200px 50px 200px 50px;
box-shadow:
#244766 10px 10px 10px;
transform: rotate(5deg)
translate(15px,10px);
}
Nigel Parker @ Mix’11
63. Dropdown Menu
PAGE 63
HTML
<ul class="menu">
<li><a href="/a/">Menu</a>
<ul>
<li><a href="/a/a">Sub-menu A</a></li>
<li><a href="/a/b">Sub-menu A</a></li>
<li><a href="/a/c">Sub-menu A</a></li>
</ul>
</li>
</ul>
CSS
.menu > li > ul {
display:none;
}
.menu > li:hover > ul {
display:block;
}
Jonathan Snook @ Mix’11
67. Connectivity
More efficient connectivity means more real-
time chats, faster games, and better
communication. Web Sockets and Server-
Sent Events are pushing (pun intended) data
between client and server more efficiently
than ever before.
68. The concept of “Real Time Web” is awesome.
Craig Kitterman & Paul Batum @ Mix’11
69. WebSockets
PAGE 69
Bidirectional
Single TCP socket
In & out of browser
Real time performance
Simple programming model
Bandwidth savings
Scalability advantages
a socket that works anywhere across the web …even
through network intermediaries
Craig Kitterman & Paul Batum @ Mix’11
71. 3D, Graphics, Effects
Between SVG, Canvas, WebGL, and CSS3 3D
features, you're sure to amaze your users
with stunning visuals natively rendered in the
browser.
72. What’s Canvas?
HTML5 element that allows for dynamic, scriptable rendering of 2D shapes
and bitmaps
Immediate mode rendering
Simple API: 45 methods, 21 attributes
Jatinder Mann @ Mix’11
74. Create a Canvas Element
<canvas id="myCanvas" width="200" height="100"></canvas>
PAGE 74
<script type="text/javascript">
var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
cxt.fillStyle="#FF0000";
cxt.fillRect(0,0,150,75);
</script>
http://www.w3schools.com
75. Offline & Storage
Web Apps can start faster and work even if
there is no internet connection, thanks to the
HTML5 App Cache, as well as the Local
Storage, Indexed DB, and the File API
specifications.
76. HTML 5 Semantics
Giving meaning to structure, semantics are
front and center with HTML5. A richer set of
tags, along with RDFa, microdata, and
microformats, are enabling a more useful,
data driven web for both programs and your
users.
77. Device Access
Beginning with the Geolocation API, Web
Applications can present rich, device-aware
features and experiences. Incredible device
access innovations are being developed and
implemented, from audio/video input access
to microphones and cameras, to local data
such as contacts & events, and even tilt
orientation.
78. Performance & Integration
Make your Web Apps and dynamic web
content faster with a variety of techniques
and technologies such as Web Workers and
XMLHttpRequest 2. No user should ever wait
on your watch.