SlideShare ist ein Scribd-Unternehmen logo
1 von 88
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.
The question is, when is HTML5 ‘done’
This is a problem??
For now, just use HTML5

      IT’S READY
Make sure that it works in every browser
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
plugins are also foreign
<video src="boringVideo.ogg"
       autoplay
       controls
       height
       width
       poster
       loop />
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
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
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");
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
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (19)

The goodies of zope, pyramid, and plone (2)
The goodies of zope, pyramid, and plone (2)The goodies of zope, pyramid, and plone (2)
The goodies of zope, pyramid, and plone (2)
 
Contributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonContributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter Wilson
 
It's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrIt's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking Modernizr
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
 
TTW FTW: Plone as the new wordpress
TTW FTW: Plone as the new wordpressTTW FTW: Plone as the new wordpress
TTW FTW: Plone as the new wordpress
 
Funnelweb ploneconf2010
Funnelweb ploneconf2010Funnelweb ploneconf2010
Funnelweb ploneconf2010
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
 
Nanoc
NanocNanoc
Nanoc
 
Developing cacheable PHP applications - PHPLimburgBE 2018
Developing cacheable PHP applications - PHPLimburgBE 2018Developing cacheable PHP applications - PHPLimburgBE 2018
Developing cacheable PHP applications - PHPLimburgBE 2018
 
Refresh Austin - Intro to Dexy
Refresh Austin - Intro to DexyRefresh Austin - Intro to Dexy
Refresh Austin - Intro to Dexy
 
Plone pwns
Plone pwnsPlone pwns
Plone pwns
 
Developing cacheable PHP applications - Confoo 2018
Developing cacheable PHP applications - Confoo 2018Developing cacheable PHP applications - Confoo 2018
Developing cacheable PHP applications - Confoo 2018
 
Plone: The CMS that hits above it's weight
Plone: The CMS that hits above it's weightPlone: The CMS that hits above it's weight
Plone: The CMS that hits above it's weight
 
How to make Ajax work for you
How to make Ajax work for youHow to make Ajax work for you
How to make Ajax work for you
 
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsAutomatic testing and quality assurance for WordPress plugins
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 - Thijs Feryn - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
 
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
 

Andere mochten auch

Andere mochten auch (8)

Seminário de Desenvolvimento Mobile - Etec Cafelândia
Seminário de Desenvolvimento Mobile - Etec CafelândiaSeminário de Desenvolvimento Mobile - Etec Cafelândia
Seminário de Desenvolvimento Mobile - Etec Cafelândia
 
HTML5 Intro
HTML5 IntroHTML5 Intro
HTML5 Intro
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sass
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Intro to HTML + CSS
Intro to HTML + CSSIntro to HTML + CSS
Intro to HTML + CSS
 
An Intro to HTML & CSS
An Intro to HTML & CSSAn Intro to HTML & CSS
An Intro to HTML & CSS
 
Intro to HTML
Intro to HTMLIntro to HTML
Intro to HTML
 
03 - Web-технологии. Язык разметки HTML
03 - Web-технологии. Язык разметки HTML03 - Web-технологии. Язык разметки HTML
03 - Web-технологии. Язык разметки HTML
 

Ähnlich wie Html5 intro

Web Directions @media 2010
Web Directions @media 2010Web Directions @media 2010
Web Directions @media 2010
Patrick Lauke
 
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
Patrick Lauke
 
webinale2011_Chris Mills_Brave new world of HTML5Html5
webinale2011_Chris Mills_Brave new world of HTML5Html5webinale2011_Chris Mills_Brave new world of HTML5Html5
webinale2011_Chris Mills_Brave new world of HTML5Html5
smueller_sandsmedia
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!
Gill Cleeren
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
madhavforu
 
Leave No One Behind with HTML5 - FFWD.PRO, Croatia
Leave No One Behind with HTML5 - FFWD.PRO, CroatiaLeave No One Behind with HTML5 - FFWD.PRO, Croatia
Leave No One Behind with HTML5 - FFWD.PRO, Croatia
Robert Nyman
 

Ähnlich wie Html5 intro (20)

DevFest Makerere html5 presentation by caesar mukama
DevFest Makerere html5 presentation by caesar mukamaDevFest Makerere html5 presentation by caesar mukama
DevFest Makerere html5 presentation by caesar mukama
 
Html 5
Html 5Html 5
Html 5
 
Web Apps
Web AppsWeb Apps
Web Apps
 
[In Control 2010] HTML5
[In Control 2010] HTML5[In Control 2010] HTML5
[In Control 2010] HTML5
 
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
 
Web Directions @media 2010
Web Directions @media 2010Web Directions @media 2010
Web Directions @media 2010
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
 
Brave new world of HTML5
Brave new world of HTML5Brave new world of HTML5
Brave new world of HTML5
 
webinale2011_Chris Mills_Brave new world of HTML5Html5
webinale2011_Chris Mills_Brave new world of HTML5Html5webinale2011_Chris Mills_Brave new world of HTML5Html5
webinale2011_Chris Mills_Brave new world of HTML5Html5
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
 
The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
 
Introduccion a HTML5
Introduccion a HTML5Introduccion a HTML5
Introduccion a HTML5
 
html5
html5html5
html5
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
HTML5 Design
HTML5 DesignHTML5 Design
HTML5 Design
 
Leave No One Behind with HTML5 - FFWD.PRO, Croatia
Leave No One Behind with HTML5 - FFWD.PRO, CroatiaLeave No One Behind with HTML5 - FFWD.PRO, Croatia
Leave No One Behind with HTML5 - FFWD.PRO, Croatia
 
Html5 + css3+ java script for future - HTML5
Html5 + css3+ java script for future - HTML5Html5 + css3+ java script for future - HTML5
Html5 + css3+ java script for future - HTML5
 

Mehr von Kevin DeRudder

Mehr von Kevin DeRudder (12)

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

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Html5 intro