HTML5 Intro
@kevinderudder working for
eGuidelines and a lecturer at the
Technical University of West Flanders.

Contact me on kevin@eguidelines.be
Agenda

•   Introduction
•   Structure of an HTML5 page
•   New Tags
•   Forms
•   Video and audio
•   Canvas
What is HTML 5
HTML5 = New Markup + JavaScript APIs
Be aware, HTML5 is not finished yet.


Some demo’s will not work in some browsers.
Html5 intro
The question is, when is HTML5 ‘done’
Html5 intro
This is a problem??
Html5 intro
For now, just use HTML5

      IT’S READY
Make sure that it works in every browser
Html5 intro
if (Modernizr.canvas) {

}

if (Modernizr.audio) {

}
STRUCTURE
Klassiek


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

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <link rel="stylesheet" type="text/css" href="styles.css" />
   <title></title>
</head>

<body>
    <p>Hello World!</p>
</body>

</html>
DocType


<!DOCTYPE html>



<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <link rel="stylesheet" type="text/css" href="styles.css" />
   <title></title>
</head>

<body>
    <p>Hello World!</p>
</body>

</html>
xmlns


<!DOCTYPE html>



<html>

<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <link rel="stylesheet" type="text/css" href="styles.css" />
   <title></title>
</head>

<body>
    <p>Hello World!</p>
</body>

</html>
Meta charset


<!DOCTYPE html>



<html>

<head>
   <meta charset=“utf-8" />
   <link rel="stylesheet" type="text/css" href="styles.css" />
   <title></title>
</head>

<body>
    <p>Hello World!</p>
</body>

</html>
Link type


<!DOCTYPE html>



<html>

<head>
   <meta charset= "utf-8" />
   <link rel="stylesheet" href="styles.css" />
   <title></title>
</head>

<body>
    <p>Hello World!</p>
</body>

</html>
NEW TAGS
Article      Footer     rt
Aside        Header     Ruby
Audio        Hgroup     Section
Canvas       Keygen     Source
Command      Mark       Summary
Datalist     Meter      Time
Details      Nav        Video
Embed        Output     wbr
Figcaption   Progress
figure       rp
Which class names are used on most pages?
footer
menu
title
small
text
content
header
nav
copyright
button
main
search
msonormal
date
smalltext
body
style1
top
white
link

            http://code.google.com/intl/nl-NL/webstats/2005-12/classes.html
div id=“header”
                   div id=“topmenu”

                                div id=“page”



                               div class=“post”
div id=“sidebar”



                               div class=“post”



                    div id=“footer”
<header>
           <nav>

                     <section>



                     <article>
<aside>



                     <article>



          <footer>
Forms
HTML4 exists out of dumb fields
/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
New attributes and input types available
<input type="email" />
<input type="url" />
<input   type="date" />
<input   type="month" />
<input   type="week" />
<input   type="time" />
<input   type="datetime" />
<input   type="datetime-local" />
<input type="number" />
<input type="range" />
<input type="tel" />
<input type="color" />
<input type="text" id="languageText"
       list="languageList" />

<datalist id="languageList">
  <option value="en" label="English" />
  <option value="nl" label="Nederlands" />
  <option value="fr" label="Français" />
</datalist>
<input id="firstName" required />
<input id="firstName"
       placeholder=“your firstname” />
<input id="firstName" autofocus />
<input id="firstName" pattern=“[a-zA-Z]” />
Check with JavaScript



 function validateControl() {
        var txt = document.getElementById('myText').validity;
        alert(txt.valid);
  }
Video and Audio
Video - width - height - poster == Audio
Why do we need a video element???
When you wanted to use video, you needed
        to use the <object/> tag.


The <object/> tag is for foreign objects and
         the video is not foreign
Html5 intro
plugins are also foreign
<video src="boringVideo.ogg"
       autoplay
       controls
       height
       width
       poster
       loop />
Html5 intro
2 new codecs


• Specifications said: all browsers should at least
  have built-in support for 2 new codecs:

  • Ogg Vorbis for audio
  • Ogg Theora for movies
Apple and Nokia said NO
So there is no specification for audio and video
And so the developer-browser story
            continues
H.264, Theora and VP8 are the most relevant
               video codecs




   For audio we use MP3, AAC and Vorbis
Theora and Vorbis in an Ogg container
   Firefox 4 supports also WebM
Theora and Vorbis in an Ogg container
  Opera 10.6 supports also WebM
Theora and Vorbis in an Ogg container
   Chrome 6 supports also WebM
Anything that Quicktime supports, which is a
  long list, but no WebM, Theora, Vorbis

   H.264 video and AAC audio supported
Supports all profiles of H.264 and AAC in an
               MP4 container

                  >= IE9
What to do
1. Encode your video
2. Use multiple sources
3. Control with JavaScript
Html5 intro
Server Mime Types


 video/ogg   .ogv

 video/mp4   .mp4

 video/webm .webm
1. Encode your video
2. Use multiple sources
3. Control with JavaScript
<video id="theVideo" autoplay controls width="500">
       <source src="../videos/big_buck_bunny.mp4" />
       <source src="../videos/big_buck_bunny.ogv" />
       <source src="../videos/big_buck_bunny.webm" />
       <p>Your browser doesn't support video</p>
</video>
1. Encode your video
2. Use multiple sources
3. Control with JavaScript
function playPauseVideo(sender) {
       if (video.paused || video.ended) {
               if (video.ended) {
                       video.currentTime = 0;
               }

                sender.innerHTML = '&#x2590;&#x2590;';
                sender.title = 'play';
                video.play();
       }
       else {
                sender.innerHTML = '&#x25BA;';
                sender.title = 'pause';
                video.pause();
       }
}
video.addEventListener('play' , function () {…;}, false),
video.addEventListener('pause' , function () {…; }, false)
Canvas
Html5 intro
Html5 intro
Html5 intro
Html5 intro
Instead of drawing with a brush, use JavaScript
<canvas></canvas>
<canvas width="100" height="100">
      <p>Your browser does not support the canvas</p>
</canvas>
First, get your canvas context



  var canvas = document.getElementById('theCanvas');
  var ctx = canvas.getContext("2d");
Html5 intro
ctx.beginPath();
ctx.moveTo(75, 50);
ctx.lineTo(75, 100);
ctx.lineTo(25, 100);
ctx.fill();
var context = canvas.getContext("2d");

var img = new Image(); img.onload = function () {
       alert('loaded');
       context.drawImage(img, 0, 0, 250, 375);
}

img.src = '../images/Soldier_stub.png';
Lot’s of possibilities

• Transformations
  • setTransform
  • Rotate, scale, skew, pan, …


• Run over Pixels
• Save canvas content
Resources
Html5 intro
Html5 intro
Thank you

More Related Content

PDF
What you need to know bout html5
ODP
An Introduction to Windows PowerShell
PDF
HTML 5 - Overview
PDF
HTML5 for the Silverlight Guy
PDF
[Bristol WordPress] Supercharging WordPress Development
PPT
WordPress and Ajax
ODP
Pyramid Lighter/Faster/Better web apps
PDF
Pragmatic Browser Automation with Geb - GIDS 2015
What you need to know bout html5
An Introduction to Windows PowerShell
HTML 5 - Overview
HTML5 for the Silverlight Guy
[Bristol WordPress] Supercharging WordPress Development
WordPress and Ajax
Pyramid Lighter/Faster/Better web apps
Pragmatic Browser Automation with Geb - GIDS 2015

What's hot (19)

PDF
The goodies of zope, pyramid, and plone (2)
PDF
Contributing to WordPress Core - Peter Wilson
KEY
It's a Mod World - A Practical Guide to Rocking Modernizr
PDF
Improving WordPress performance (xdebug and profiling)
ODP
TTW FTW: Plone as the new wordpress
PPT
Funnelweb ploneconf2010
ODP
Modern Perl
PPTX
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
PDF
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
PDF
PDF
Developing cacheable PHP applications - PHPLimburgBE 2018
PDF
Refresh Austin - Intro to Dexy
ODP
Plone pwns
PDF
Developing cacheable PHP applications - Confoo 2018
PPTX
Plone: The CMS that hits above it's weight
PDF
How to make Ajax work for you
PDF
Automatic testing and quality assurance for WordPress plugins
PDF
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
PDF
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
The goodies of zope, pyramid, and plone (2)
Contributing to WordPress Core - Peter Wilson
It's a Mod World - A Practical Guide to Rocking Modernizr
Improving WordPress performance (xdebug and profiling)
TTW FTW: Plone as the new wordpress
Funnelweb ploneconf2010
Modern Perl
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Developing cacheable PHP applications - PHPLimburgBE 2018
Refresh Austin - Intro to Dexy
Plone pwns
Developing cacheable PHP applications - Confoo 2018
Plone: The CMS that hits above it's weight
How to make Ajax work for you
Automatic testing and quality assurance for WordPress plugins
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Ad

Viewers also liked (8)

PDF
Seminário de Desenvolvimento Mobile - Etec Cafelândia
KEY
HTML5 Intro
PDF
Intro to html, css & sass
PDF
Html5 intro
PDF
Intro to HTML + CSS
PDF
An Intro to HTML & CSS
PDF
Intro to HTML
PDF
03 - Web-технологии. Язык разметки HTML
Seminário de Desenvolvimento Mobile - Etec Cafelândia
HTML5 Intro
Intro to html, css & sass
Html5 intro
Intro to HTML + CSS
An Intro to HTML & CSS
Intro to HTML
03 - Web-технологии. Язык разметки HTML
Ad

Similar to Html5 intro (20)

PPTX
Top 10 HTML5 features every developer should know!
PDF
HTML5 and Accessibility sitting in a tree
PDF
Web Directions @media 2010
PDF
WordCamp Thessaloniki2011 The NextWeb
PDF
Word camp nextweb
PDF
Brave new world of HTML5
PDF
webinale2011_Chris Mills_Brave new world of HTML5Html5
PDF
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
PDF
HTML5 Refresher
PDF
Echo HTML5
PDF
HTML5 and CSS3 Shizzle
PPTX
Html 5
PDF
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
KEY
An Introduction to HTML5
PDF
Speak The Web: The HTML5 Experiments
PDF
Basics of HTML5 for Phonegap
PDF
HTML5 Intoduction for Web Developers
PPTX
PDF
DevFest Makerere html5 presentation by caesar mukama
Top 10 HTML5 features every developer should know!
HTML5 and Accessibility sitting in a tree
Web Directions @media 2010
WordCamp Thessaloniki2011 The NextWeb
Word camp nextweb
Brave new world of HTML5
webinale2011_Chris Mills_Brave new world of HTML5Html5
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
HTML5 Refresher
Echo HTML5
HTML5 and CSS3 Shizzle
Html 5
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
An Introduction to HTML5
Speak The Web: The HTML5 Experiments
Basics of HTML5 for Phonegap
HTML5 Intoduction for Web Developers
DevFest Makerere html5 presentation by caesar mukama

More from Kevin DeRudder (12)

PPTX
Build your own Cloud/Home security system for 60$
PDF
Comparing xaml and html
PDF
ECMASCRIPT.NEXT
PDF
VISUG: Visual studio for web developers
PDF
Testing apps with MTM and Tea Foundation Service
PDF
ECMAScript.Next ECMAScipt 6
PDF
Building cross platform applications using Windows Azure Mobile Services
PDF
Responsive SharePoint
PDF
Use html5 to build what you want, where you want it
PDF
Developers and Designers
PDF
Every Web Developer is a Win8 developer
PDF
Media queries
Build your own Cloud/Home security system for 60$
Comparing xaml and html
ECMASCRIPT.NEXT
VISUG: Visual studio for web developers
Testing apps with MTM and Tea Foundation Service
ECMAScript.Next ECMAScipt 6
Building cross platform applications using Windows Azure Mobile Services
Responsive SharePoint
Use html5 to build what you want, where you want it
Developers and Designers
Every Web Developer is a Win8 developer
Media queries

Recently uploaded (20)

PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PPTX
future_of_ai_comprehensive_20250822032121.pptx
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
LMS bot: enhanced learning management systems for improved student learning e...
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
4 layer Arch & Reference Arch of IoT.pdf
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PPTX
Module 1 Introduction to Web Programming .pptx
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PPTX
Configure Apache Mutual Authentication
PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Statistics on Ai - sourced from AIPRM.pdf
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
future_of_ai_comprehensive_20250822032121.pptx
Co-training pseudo-labeling for text classification with support vector machi...
LMS bot: enhanced learning management systems for improved student learning e...
Comparative analysis of machine learning models for fake news detection in so...
4 layer Arch & Reference Arch of IoT.pdf
MuleSoft-Compete-Deck for midddleware integrations
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
NewMind AI Weekly Chronicles – August ’25 Week IV
Module 1 Introduction to Web Programming .pptx
Improvisation in detection of pomegranate leaf disease using transfer learni...
Lung cancer patients survival prediction using outlier detection and optimize...
Configure Apache Mutual Authentication
SGT Report The Beast Plan and Cyberphysical Systems of Control
Basics of Cloud Computing - Cloud Ecosystem
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Statistics on Ai - sourced from AIPRM.pdf

Html5 intro