SlideShare uma empresa Scribd logo
1 de 73
Baixar para ler offline
HTML5 NOW
                           Guest Appearance By CSS3


                                    ★
                                  Clinton R. Nixon
                              Web Wrangler, Viget Labs


Friday, January 29, 2010
What is
                           HTML5?
Friday, January 29, 2010
★ Not XHTML 2.0
                 ★ “Web Applications 1.0”
                 ★ Description of current browser behavior
                 ★ Description of common web page structure
                 ★ A bunch of new tags
                 ★ And a bunch of new attributes
                 ★ New JavaScript capabilities
                 ★ The DOM definition

Friday, January 29, 2010
Why HTML5?

Friday, January 29, 2010
★ Ease of use
                     ★ Semantic blah blah blah
                     ★ Reduce content size
                     ★ JavaScript and web app capabilities
                     ★ Mobile applications
                     ★ Learning new things is fun


Friday, January 29, 2010
HTML5
                           Documents
Friday, January 29, 2010
<!DOCTYPE html>




Friday, January 29, 2010
OK!


          <!DOCTYPE html>




Friday, January 29, 2010
<!DOCTYPE html>
        <title>Valid HTML 5</title>
        <p>Hello world</p>




Friday, January 29, 2010
Caut
                                ion!

        <!DOCTYPE html>
        <title>Valid HTML 5</title>
        <p>Hello world</p>




Friday, January 29, 2010
This is not XHTML

                   <!DOCTYPE html>
                   <html>
                     <head>
                       <meta charset="UTF-8">
                       <title>My Sample HTML 5 Page</title>
                     <body>
                       <p>This is perfectly valid HTML.



Friday, January 29, 2010
But XHTML-style is also valid

                   <!DOCTYPE html>
                   <html>
                     <head>
                       <meta charset="UTF-8" />
                       <title>My Sample HTML 5 Page</title>
                     </head>
                     <body>
                       <p>This is perfectly valid HTML.</p>
                     </body>
                   </html>



Friday, January 29, 2010
HTML5
                           Elements
Friday, January 29, 2010
New block-level elements

                     ★ header    ★ article
                     ★ footer    ★ aside
                     ★ hgroup    ★ dialog
                     ★ nav       ★ command
                     ★ section   ★ output


Friday, January 29, 2010
New block-level elements

                     ★ header    ★ article   OK*
                     ★ footer    ★ aside
                     ★ hgroup    ★ dialog
                     ★ nav       ★ command
                     ★ section   ★ output


Friday, January 29, 2010
New block-level elements

                     ★ header                   ★ article   OK*
                     ★ footer                   ★ aside
                     ★ hgroup    Cau
                                       tion
                                            !   ★ dialog
                     ★ nav                      ★ command
                     ★ section                  ★ output


Friday, January 29, 2010
<header>
        <h1>Good  Times  Blog</h1>
        <p  class="description">Good  Times  Blog  is  the  blog  that  most  ...</p>
    </header>
    <nav>
        <menu>
            <li><a  href="/archives">Archives</a></li>
            <li><a  href="/about">About</a></li>
        </menu>
    </nav>
    <section  id="posts">
        <article>
            <header>
                <h2>Best  Throat-­‐Singing  Albums  of  2009</h2>
                <div  class="date">10  Jan  2009</div>
            </header>
            <p>The  best  throat-­‐singing  ...</p>
            <p>In  my  opinion  ...</p>
            <aside><p>Throat  singing  is  practiced  by  ...</p></aside>
            <footer>
                <p>Posted  by  Clinton  R.  Nixon</p>
                <p><a  href="/best-­‐throat-­‐singing#comments">3  comments</a></p>
            </footer>
        </article>
        <article>...</article>
        <nav><a  href="/archives">Earlier  Entries</a></nav>
    </section>
    <footer><p>Good  Times  Blog  is  (c)  2010  +3  Magic  Sword  Productions</p></footer>
Friday, January 29, 2010
<section  id="posts">
          <article>
              <header>
                  <h2>Best  Throat-­‐Singing  Albums  of  2009</h2>
                  <div  class="date">10  Jan  2009</div>
              </header>
              <p>The  best  throat-­‐singing  ...</p>
              <p>In  my  opinion  ...</p>
              <aside>
                  <p>Throat  singing  is  practiced  by  ...</p>
              </aside>
              <footer>
                  <p>Posted  by  Clinton  R.  Nixon</p>
                  <p><a  href="/best-­‐throat-­‐singing#comments">
                      3  comments</a></p>
              </footer>
          </article>
          <article>...</article>
          <nav><a  href="/archives">Earlier  Entries</a></nav>
      </section>

Friday, January 29, 2010
New text-level elements


                     ★ mark
                     ★ time
                     ★ meter
                     ★ progress



Friday, January 29, 2010
New text-level elements

                                    OK*
                     ★ mark
                     ★ time
                     ★ meter
                     ★ progress



Friday, January 29, 2010
This  album  received  
       <meter  value="7.4"  min="0.0"  max="10.0"  
       low="5.0"  high="7.5"  optimum="9.0">
           a  score  of  7.4
       </meter>  on  Pitchfork.

       You  answered  
       <meter>62.5%</meter>  or  <meter>5/8</meter>ths  
       of  the  trivia  questions  correctly.

       We  are  
       <progress  value="48"  max="91">
           more  than  halfway
       </progress>
       through  with  the  movie.

Friday, January 29, 2010
* IE, Firefox 2




Friday, January 29, 2010
* IE, Firefox 2
                   IE doesn’t let you style unknown elements.
                   You can fix this with a little JS.




Friday, January 29, 2010
* IE, Firefox 2
                   IE doesn’t let you style unknown elements.
                   You can fix this with a little JS.

                   Firefox 2 (and other old Gecko browsers) are
                   batpoop crazy. 3-4% of the browser market.
                   Worth it?



Friday, January 29, 2010
Changed elements
                     ★ block-level <a>
                     ★ <b>, <i> and <small> are semantically
                           justified

                     ★ <address> is revisited
                     ★ <menu> is back in town and ready to kick
                           <ul> in the validator


Friday, January 29, 2010
Changed elements
                     ★ block-level <a>                     OK!
                     ★ <b>, <i> and <small> are semantically
                           justified

                     ★ <address> is revisited
                     ★ <menu> is back in town and ready to kick
                           <ul> in the validator


Friday, January 29, 2010
Changed elements
                     ★ block-level <a>                     OK!
                     ★ <b>, <i> and <small> are semantically
                           justified

                     ★ <address> is revisited
                     ★ <menu> is back in town and ready to kick
                           <ul> in the validator   metal




Friday, January 29, 2010
Elements that have
                           been run out of town
                           basefont    u
                           big         frame
                           center      frameset
                           font        noframes
                           s           acronym
                           strike      applet
                           tt



Friday, January 29, 2010
New and changed
                              attributes
                  All presentational   contexteditable   <ol reversed>
                  attributes are       contextmenu       <script async>
                  gone.                draggable         <style scoped>
                  <a id> instead of    hidden
                  <a name>             spellcheck
                  data-*               <a ping>




Friday, January 29, 2010
New and changed
                              attributes
                  All presentational   contexteditable   <ol reversed>
                  attributes are       contextmenu       <script async>
                  gone.                draggable         <style scoped>
                  <a id> instead of    hidden
                  <a name>             spellcheck
                  data-*               <a ping>




               OK!
Friday, January 29, 2010
New and changed
                              attributes
                  All presentational   contexteditable   <ol reversed>
                  attributes are       contextmenu       <script async>
                  gone.                draggable         <style scoped>
                  <a id> instead of    hidden
                  <a name>             spellcheck
                  data-*               <a ping>




               OK!                     Caut
                                                ion!

Friday, January 29, 2010
New and changed
                              attributes
                  All presentational   contexteditable   <ol reversed>
                  attributes are       contextmenu       <script async>
                  gone.                draggable         <style scoped>
                  <a id> instead of    hidden
                  <a name>             spellcheck
                  data-*               <a ping>




               OK!                     Caut
                                                ion!
                                                          Danger!


Friday, January 29, 2010
HTML5
                           Forms
Friday, January 29, 2010
★ A lot of HTML5 is focused on web
                           applications.

                     ★ Because of that, forms have gained a
                           lot of capabilities.




Friday, January 29, 2010
New input types
                           tel        week
                           search     time
                           url        datetime-­‐local
                           email      number
                           datetime   range
                           date       color
                           month




Friday, January 29, 2010
New input types
                           tel        week
                           search     time
                           url        datetime-­‐local
                           email      number
                           datetime   range
                           date       color


                                                 OK!
                           month




Friday, January 29, 2010
New attributes for
                            form elements
                           <input autofocus>
                           <input required>
                           <input placeholder>
                           <input form=form_id>
                           <input min=x max=y>
                           <input multiple>
                           <input pattern=some_pattern>
                           <input list=list_name>
                           <form novalidate>


Friday, January 29, 2010
New attributes for
                            form elements
                           <input autofocus>
                           <input required>           Caut
                           <input placeholder>             ion!
                           <input form=form_id>
                           <input min=x max=y>
                           <input multiple>
                           <input pattern=some_pattern>
                           <input list=list_name>
                           <form novalidate>


Friday, January 29, 2010
Datalists
                   <input list="sandwiches" name="sandwich">
                   <datalist id="sandwiches">
                     <option value="hamburger">hamburger
                     <option value="reuben">reuben
                     <option value="grilled cheese">grilled
                   cheese
                   </datalist>




Friday, January 29, 2010
Datalists
                   <input list="sandwiches" name="sandwich">
                   <datalist id="sandwiches">
                     <option value="hamburger">hamburger
                     <option value="reuben">reuben
                     <option value="grilled cheese">grilled
                   cheese
                   </datalist>
                                                      Caut
                                                           ion!


Friday, January 29, 2010
MULTIMEDIA
                      RODEO
Friday, January 29, 2010
★ New tags: <audio> and <video>
                     ★ Only supported in FF 3.5+, Safari 4,
                           and Chrome 3
                     ★ Biggest problem: codec support
                     ★ Biggest use: mobile devices



Friday, January 29, 2010
Media attributes
                           src
                           autobuffer
                           autoplay
                           loop
                           controls
                           width (video only)
                           height (video only)
                           poster (video only)



Friday, January 29, 2010
How to fix codec issues
           <video controls>                               for Safari and Chrome
             <source src="/downloads/streaming/media/tube1.mp4">
             <source src="/downloads/streaming/media/tube1.ogv"
               type="video/ogg; codecs=theora,vorbis">

             <!-- No HTML 5 support. Use Flash instead -->
             <a href="/downloads/streaming/media/tube1.mp4" id="player"></a>
             <script>
               $f("player", "/downloads/streaming/swf/flowplayer-3.0.5.swf",
           {config: { autoPlay: false, autoBuffering: true }});
             </script>
           </video>




Friday, January 29, 2010
How to fix codec issues
           <video controls>
             <source src="/downloads/streaming/media/tube1.mp4">
             <source src="/downloads/streaming/media/tube1.ogv"
               type="video/ogg; codecs=theora,vorbis">
                                                                    for Firefox
             <!-- No HTML 5 support. Use Flash instead -->
             <a href="/downloads/streaming/media/tube1.mp4" id="player"></a>
             <script>
               $f("player", "/downloads/streaming/swf/flowplayer-3.0.5.swf",
           {config: { autoPlay: false, autoBuffering: true }});
             </script>
           </video>




Friday, January 29, 2010
The Canvas

Friday, January 29, 2010
★ Pixel-based drawing surface: points,
                           lines, curves, shapes, gradients, fonts,
                           images, and even video
                     ★ Doesn’t work with IE natively
                     ★ ExplorerCanvas can help, but isn’t
                           perfect (no fonts, images, or video)
                     ★ Alternative to Flash
                     ★ Interactive via JS


Friday, January 29, 2010
★ Pixel-based drawing surface: points,
                           lines, curves, shapes, gradients, fonts,
                           images, and even video
                     ★ Doesn’t work with IE natively
                     ★ ExplorerCanvas can help, but isn’t
                           perfect (no fonts, images, or video)
                     ★ Alternative to Flash
                                                          Caut
                     ★ Interactive via JS                         ion!


Friday, January 29, 2010
JavaScript
                            Stampede
Friday, January 29, 2010
Cross-document messaging


                   One document sends messages using
                   postMessage(); another document listens
                   by adding an event listener for
                   “message.”




Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;

            event.source.postMessage("message  posted",
                                                              event.origin);
        });
        </script>


Friday, January 29, 2010
<iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe>
        <form  id="localwriter">
            <input  type="text"  id="message">
            <input  type="submit">
        </form>
        <script>
            $(document).ready(function  ()  {
                var  whiteboard  =  $('#whiteboard').get(0);
                $('#localwriter').bind('submit',  function  (event)  {
                    whiteboard.postMessage($('#message').val(),
                                                                    'http://writeboard.me/');
                    event.preventDefault();
                });
            });
        </script>
        -­‐-­‐-­‐
        <script>
        $(window).bind('message',  function  (event)  {
            if  (event.origin  !==  'http://crnixon.org')  {  return;  }
            
            $("#output").get(0).textContent  +=  "<p>"  +
                "so-­‐and-­‐so  said:  "  +  event.data;
                                                                                      Caut
            event.source.postMessage("message  posted",
                                                              event.origin);
                                                                                                ion!
        });
        </script>


Friday, January 29, 2010
Not actually HTML5
                     ★ Web Workers
                     ★ Web Storage
                     ★ Web Sockets
                     ★ Server-sent Events
                     ★ Web SQL Database
                     ★ Geolocation API
                     ★ XMLHttpRequest Level 2


Friday, January 29, 2010
Web Storage
                     ★ Key-value pairs
                     ★ sessionStorage and localStorage
                     ★ Asynchronous, but fires events
                     ★ Only stores strings
                     ★ Max storage size varies by browser


Friday, January 29, 2010
Web Storage
                                                       OK!
                     ★ Key-value pairs
                     ★ sessionStorage and localStorage
                     ★ Asynchronous, but fires events
                     ★ Only stores strings
                     ★ Max storage size varies by browser


Friday, January 29, 2010
localStorage.setItem("emails",
         JSON.stringify(emails));
     var emails = JSON.parse(
         localStorage.getItem("emails"));
     localStorage.removeItem("emails");
     localStorage.clear();

     $(window).bind('storage', function (event) {
       if (event.key == null) {
         // clear event
       } else if (event.newValue == null) {
         // removeItem event
       } else {
         // setItem event
       }
     });

Friday, January 29, 2010
Detection
                             with
                           MODERNIZR
Friday, January 29, 2010
★ Input types           ★ @font-face
                 ★ Input attributes      ★ border-image
                 ★ <audio> and <video>   ★ border-radius
                 ★ <canvas>              ★ box-shadow
                 ★ <canvas> text         ★ Multiple backgrounds
                 ★ localStorage          ★ opacity
                 ★ sessionStorage        ★ CSS animations,
                 ★ Web Workers             reflections &
                                           transforms
                 ★ applicationCache
                                         ★ Columns
                 ★ Geolocation API


Friday, January 29, 2010
Modernizr
                     ★ Adds detection via CSS properties
                           and JavaScript.
                     ★ Attaches classes to <html> and creates
                           a global Modernizr object.

                     ★ Allows you to add your own tests.


Friday, January 29, 2010
/* Simulated box shadow using borders: */
        div.somediv {
           border-bottom: 1px solid #666;
           border-right: 1px solid #777;
        }
        .boxshadow div.somediv {
           border: none;
           box-shadow: #666 1px 1px 1px;
           -moz-box-shadow: #666 1px 1px 1px;
           -webkit-box-shadow: #666 1px 1px 1px;
        }


Friday, January 29, 2010
if (!Modernizr.inputtypes.date){
          $("input[type='date']").datepicker();
        }




Friday, January 29, 2010
The Future
                            of HTML
Friday, January 29, 2010
Questions?


Friday, January 29, 2010
                             <
Find out more at:
                   http://crnixon.org
                   http://pinboard.in/u:crnixon/t:html5/
                   or email me at clinton.nixon@viget.com.




Friday, January 29, 2010

Mais conteúdo relacionado

Semelhante a HTML5 Now

"How Mozilla Uses Selenium"
"How Mozilla Uses Selenium""How Mozilla Uses Selenium"
"How Mozilla Uses Selenium"Stephen Donner
 
Laying Pipe with Transmogrifier
Laying Pipe with TransmogrifierLaying Pipe with Transmogrifier
Laying Pipe with TransmogrifierClayton Parker
 
Joomla: 10 years of progress (jd15fr)
Joomla: 10 years of progress (jd15fr)Joomla: 10 years of progress (jd15fr)
Joomla: 10 years of progress (jd15fr)Peter Martin
 
HTML5 - getting started
HTML5 - getting startedHTML5 - getting started
HTML5 - getting startedTed Drake
 
In depth with html5 java2days 2010
In depth with html5 java2days 2010In depth with html5 java2days 2010
In depth with html5 java2days 2010Mystic Coders, LLC
 
Continuous Integration Testing for Plone Using Hudson
Continuous Integration Testing for Plone Using HudsonContinuous Integration Testing for Plone Using Hudson
Continuous Integration Testing for Plone Using HudsonEric Steele
 
HTML5/CSS3 @ Baidu
HTML5/CSS3 @ BaiduHTML5/CSS3 @ Baidu
HTML5/CSS3 @ BaiduZi Bin Cheah
 
Collective Amberjack - European Plone Symposium
Collective Amberjack - European Plone SymposiumCollective Amberjack - European Plone Symposium
Collective Amberjack - European Plone SymposiumMassimo Azzolini
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)François Massart
 
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet![edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!Christopher Schmitt
 
Joomla PLT Summit Feedback
Joomla PLT Summit FeedbackJoomla PLT Summit Feedback
Joomla PLT Summit FeedbackChris Davenport
 
10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study10x Performance Improvements - A Case Study
10x Performance Improvements - A Case StudyRonald Bradford
 
Palm Developer Day: Opening Keynote
Palm Developer Day: Opening KeynotePalm Developer Day: Opening Keynote
Palm Developer Day: Opening Keynotedion
 

Semelhante a HTML5 Now (20)

"How Mozilla Uses Selenium"
"How Mozilla Uses Selenium""How Mozilla Uses Selenium"
"How Mozilla Uses Selenium"
 
Laying Pipe with Transmogrifier
Laying Pipe with TransmogrifierLaying Pipe with Transmogrifier
Laying Pipe with Transmogrifier
 
Joomla: 10 years of progress (jd15fr)
Joomla: 10 years of progress (jd15fr)Joomla: 10 years of progress (jd15fr)
Joomla: 10 years of progress (jd15fr)
 
HTML5 - getting started
HTML5 - getting startedHTML5 - getting started
HTML5 - getting started
 
In depth with html5 java2days 2010
In depth with html5 java2days 2010In depth with html5 java2days 2010
In depth with html5 java2days 2010
 
Continuous Integration Testing for Plone Using Hudson
Continuous Integration Testing for Plone Using HudsonContinuous Integration Testing for Plone Using Hudson
Continuous Integration Testing for Plone Using Hudson
 
Html5 Apps
Html5 AppsHtml5 Apps
Html5 Apps
 
HTML5/CSS3 @ Baidu
HTML5/CSS3 @ BaiduHTML5/CSS3 @ Baidu
HTML5/CSS3 @ Baidu
 
Using HTML5 sensibly
Using HTML5 sensiblyUsing HTML5 sensibly
Using HTML5 sensibly
 
Collective Amberjack - European Plone Symposium
Collective Amberjack - European Plone SymposiumCollective Amberjack - European Plone Symposium
Collective Amberjack - European Plone Symposium
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet![edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Joomla PLT Summit Feedback
Joomla PLT Summit FeedbackJoomla PLT Summit Feedback
Joomla PLT Summit Feedback
 
HTML5 Design
HTML5 DesignHTML5 Design
HTML5 Design
 
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
 
[In Control 2010] HTML5
[In Control 2010] HTML5[In Control 2010] HTML5
[In Control 2010] HTML5
 
Semantic chop
Semantic chopSemantic chop
Semantic chop
 
10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study
 
Palm Developer Day: Opening Keynote
Palm Developer Day: Opening KeynotePalm Developer Day: Opening Keynote
Palm Developer Day: Opening Keynote
 

Último

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Último (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

HTML5 Now

  • 1. HTML5 NOW Guest Appearance By CSS3 ★ Clinton R. Nixon Web Wrangler, Viget Labs Friday, January 29, 2010
  • 2. What is HTML5? Friday, January 29, 2010
  • 3. ★ Not XHTML 2.0 ★ “Web Applications 1.0” ★ Description of current browser behavior ★ Description of common web page structure ★ A bunch of new tags ★ And a bunch of new attributes ★ New JavaScript capabilities ★ The DOM definition Friday, January 29, 2010
  • 5. ★ Ease of use ★ Semantic blah blah blah ★ Reduce content size ★ JavaScript and web app capabilities ★ Mobile applications ★ Learning new things is fun Friday, January 29, 2010
  • 6. HTML5 Documents Friday, January 29, 2010
  • 8. OK! <!DOCTYPE html> Friday, January 29, 2010
  • 9. <!DOCTYPE html> <title>Valid HTML 5</title> <p>Hello world</p> Friday, January 29, 2010
  • 10. Caut ion! <!DOCTYPE html> <title>Valid HTML 5</title> <p>Hello world</p> Friday, January 29, 2010
  • 11. This is not XHTML <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>My Sample HTML 5 Page</title> <body> <p>This is perfectly valid HTML. Friday, January 29, 2010
  • 12. But XHTML-style is also valid <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>My Sample HTML 5 Page</title> </head> <body> <p>This is perfectly valid HTML.</p> </body> </html> Friday, January 29, 2010
  • 13. HTML5 Elements Friday, January 29, 2010
  • 14. New block-level elements ★ header ★ article ★ footer ★ aside ★ hgroup ★ dialog ★ nav ★ command ★ section ★ output Friday, January 29, 2010
  • 15. New block-level elements ★ header ★ article OK* ★ footer ★ aside ★ hgroup ★ dialog ★ nav ★ command ★ section ★ output Friday, January 29, 2010
  • 16. New block-level elements ★ header ★ article OK* ★ footer ★ aside ★ hgroup Cau tion ! ★ dialog ★ nav ★ command ★ section ★ output Friday, January 29, 2010
  • 17. <header>    <h1>Good  Times  Blog</h1>    <p  class="description">Good  Times  Blog  is  the  blog  that  most  ...</p> </header> <nav>    <menu>        <li><a  href="/archives">Archives</a></li>        <li><a  href="/about">About</a></li>    </menu> </nav> <section  id="posts">    <article>        <header>            <h2>Best  Throat-­‐Singing  Albums  of  2009</h2>            <div  class="date">10  Jan  2009</div>        </header>        <p>The  best  throat-­‐singing  ...</p>        <p>In  my  opinion  ...</p>        <aside><p>Throat  singing  is  practiced  by  ...</p></aside>        <footer>            <p>Posted  by  Clinton  R.  Nixon</p>            <p><a  href="/best-­‐throat-­‐singing#comments">3  comments</a></p>        </footer>    </article>    <article>...</article>    <nav><a  href="/archives">Earlier  Entries</a></nav> </section> <footer><p>Good  Times  Blog  is  (c)  2010  +3  Magic  Sword  Productions</p></footer> Friday, January 29, 2010
  • 18. <section  id="posts">    <article>        <header>            <h2>Best  Throat-­‐Singing  Albums  of  2009</h2>            <div  class="date">10  Jan  2009</div>        </header>        <p>The  best  throat-­‐singing  ...</p>        <p>In  my  opinion  ...</p>        <aside>            <p>Throat  singing  is  practiced  by  ...</p>        </aside>        <footer>            <p>Posted  by  Clinton  R.  Nixon</p>            <p><a  href="/best-­‐throat-­‐singing#comments">                3  comments</a></p>        </footer>    </article>    <article>...</article>    <nav><a  href="/archives">Earlier  Entries</a></nav> </section> Friday, January 29, 2010
  • 19. New text-level elements ★ mark ★ time ★ meter ★ progress Friday, January 29, 2010
  • 20. New text-level elements OK* ★ mark ★ time ★ meter ★ progress Friday, January 29, 2010
  • 21. This  album  received   <meter  value="7.4"  min="0.0"  max="10.0"   low="5.0"  high="7.5"  optimum="9.0">    a  score  of  7.4 </meter>  on  Pitchfork. You  answered   <meter>62.5%</meter>  or  <meter>5/8</meter>ths   of  the  trivia  questions  correctly. We  are   <progress  value="48"  max="91">    more  than  halfway </progress> through  with  the  movie. Friday, January 29, 2010
  • 22. * IE, Firefox 2 Friday, January 29, 2010
  • 23. * IE, Firefox 2 IE doesn’t let you style unknown elements. You can fix this with a little JS. Friday, January 29, 2010
  • 24. * IE, Firefox 2 IE doesn’t let you style unknown elements. You can fix this with a little JS. Firefox 2 (and other old Gecko browsers) are batpoop crazy. 3-4% of the browser market. Worth it? Friday, January 29, 2010
  • 25. Changed elements ★ block-level <a> ★ <b>, <i> and <small> are semantically justified ★ <address> is revisited ★ <menu> is back in town and ready to kick <ul> in the validator Friday, January 29, 2010
  • 26. Changed elements ★ block-level <a> OK! ★ <b>, <i> and <small> are semantically justified ★ <address> is revisited ★ <menu> is back in town and ready to kick <ul> in the validator Friday, January 29, 2010
  • 27. Changed elements ★ block-level <a> OK! ★ <b>, <i> and <small> are semantically justified ★ <address> is revisited ★ <menu> is back in town and ready to kick <ul> in the validator metal Friday, January 29, 2010
  • 28. Elements that have been run out of town basefont u big frame center frameset font noframes s acronym strike applet tt Friday, January 29, 2010
  • 29. New and changed attributes All presentational contexteditable <ol reversed> attributes are contextmenu <script async> gone. draggable <style scoped> <a id> instead of hidden <a name> spellcheck data-* <a ping> Friday, January 29, 2010
  • 30. New and changed attributes All presentational contexteditable <ol reversed> attributes are contextmenu <script async> gone. draggable <style scoped> <a id> instead of hidden <a name> spellcheck data-* <a ping> OK! Friday, January 29, 2010
  • 31. New and changed attributes All presentational contexteditable <ol reversed> attributes are contextmenu <script async> gone. draggable <style scoped> <a id> instead of hidden <a name> spellcheck data-* <a ping> OK! Caut ion! Friday, January 29, 2010
  • 32. New and changed attributes All presentational contexteditable <ol reversed> attributes are contextmenu <script async> gone. draggable <style scoped> <a id> instead of hidden <a name> spellcheck data-* <a ping> OK! Caut ion! Danger! Friday, January 29, 2010
  • 33. HTML5 Forms Friday, January 29, 2010
  • 34. ★ A lot of HTML5 is focused on web applications. ★ Because of that, forms have gained a lot of capabilities. Friday, January 29, 2010
  • 35. New input types tel week search time url datetime-­‐local email number datetime range date color month Friday, January 29, 2010
  • 36. New input types tel week search time url datetime-­‐local email number datetime range date color OK! month Friday, January 29, 2010
  • 37. New attributes for form elements <input autofocus> <input required> <input placeholder> <input form=form_id> <input min=x max=y> <input multiple> <input pattern=some_pattern> <input list=list_name> <form novalidate> Friday, January 29, 2010
  • 38. New attributes for form elements <input autofocus> <input required> Caut <input placeholder> ion! <input form=form_id> <input min=x max=y> <input multiple> <input pattern=some_pattern> <input list=list_name> <form novalidate> Friday, January 29, 2010
  • 39. Datalists <input list="sandwiches" name="sandwich"> <datalist id="sandwiches"> <option value="hamburger">hamburger <option value="reuben">reuben <option value="grilled cheese">grilled cheese </datalist> Friday, January 29, 2010
  • 40. Datalists <input list="sandwiches" name="sandwich"> <datalist id="sandwiches"> <option value="hamburger">hamburger <option value="reuben">reuben <option value="grilled cheese">grilled cheese </datalist> Caut ion! Friday, January 29, 2010
  • 41. MULTIMEDIA RODEO Friday, January 29, 2010
  • 42. ★ New tags: <audio> and <video> ★ Only supported in FF 3.5+, Safari 4, and Chrome 3 ★ Biggest problem: codec support ★ Biggest use: mobile devices Friday, January 29, 2010
  • 43. Media attributes src autobuffer autoplay loop controls width (video only) height (video only) poster (video only) Friday, January 29, 2010
  • 44. How to fix codec issues <video controls> for Safari and Chrome <source src="/downloads/streaming/media/tube1.mp4"> <source src="/downloads/streaming/media/tube1.ogv" type="video/ogg; codecs=theora,vorbis"> <!-- No HTML 5 support. Use Flash instead --> <a href="/downloads/streaming/media/tube1.mp4" id="player"></a> <script> $f("player", "/downloads/streaming/swf/flowplayer-3.0.5.swf", {config: { autoPlay: false, autoBuffering: true }}); </script> </video> Friday, January 29, 2010
  • 45. How to fix codec issues <video controls> <source src="/downloads/streaming/media/tube1.mp4"> <source src="/downloads/streaming/media/tube1.ogv" type="video/ogg; codecs=theora,vorbis"> for Firefox <!-- No HTML 5 support. Use Flash instead --> <a href="/downloads/streaming/media/tube1.mp4" id="player"></a> <script> $f("player", "/downloads/streaming/swf/flowplayer-3.0.5.swf", {config: { autoPlay: false, autoBuffering: true }}); </script> </video> Friday, January 29, 2010
  • 47. ★ Pixel-based drawing surface: points, lines, curves, shapes, gradients, fonts, images, and even video ★ Doesn’t work with IE natively ★ ExplorerCanvas can help, but isn’t perfect (no fonts, images, or video) ★ Alternative to Flash ★ Interactive via JS Friday, January 29, 2010
  • 48. ★ Pixel-based drawing surface: points, lines, curves, shapes, gradients, fonts, images, and even video ★ Doesn’t work with IE natively ★ ExplorerCanvas can help, but isn’t perfect (no fonts, images, or video) ★ Alternative to Flash Caut ★ Interactive via JS ion! Friday, January 29, 2010
  • 49. JavaScript Stampede Friday, January 29, 2010
  • 50. Cross-document messaging One document sends messages using postMessage(); another document listens by adding an event listener for “message.” Friday, January 29, 2010
  • 51. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 52. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 53. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 54. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 55. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 56. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 57. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 58. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 59. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 60. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data;    event.source.postMessage("message  posted",                                                      event.origin); }); </script> Friday, January 29, 2010
  • 61. <iframe  src="http://whiteboard.me/board"  id="whiteboard"></iframe> <form  id="localwriter">    <input  type="text"  id="message">    <input  type="submit"> </form> <script>    $(document).ready(function  ()  {        var  whiteboard  =  $('#whiteboard').get(0);        $('#localwriter').bind('submit',  function  (event)  {            whiteboard.postMessage($('#message').val(),                                                            'http://writeboard.me/');            event.preventDefault();        });    }); </script> -­‐-­‐-­‐ <script> $(window).bind('message',  function  (event)  {    if  (event.origin  !==  'http://crnixon.org')  {  return;  }        $("#output").get(0).textContent  +=  "<p>"  +        "so-­‐and-­‐so  said:  "  +  event.data; Caut    event.source.postMessage("message  posted",                                                      event.origin); ion! }); </script> Friday, January 29, 2010
  • 62. Not actually HTML5 ★ Web Workers ★ Web Storage ★ Web Sockets ★ Server-sent Events ★ Web SQL Database ★ Geolocation API ★ XMLHttpRequest Level 2 Friday, January 29, 2010
  • 63. Web Storage ★ Key-value pairs ★ sessionStorage and localStorage ★ Asynchronous, but fires events ★ Only stores strings ★ Max storage size varies by browser Friday, January 29, 2010
  • 64. Web Storage OK! ★ Key-value pairs ★ sessionStorage and localStorage ★ Asynchronous, but fires events ★ Only stores strings ★ Max storage size varies by browser Friday, January 29, 2010
  • 65. localStorage.setItem("emails", JSON.stringify(emails)); var emails = JSON.parse( localStorage.getItem("emails")); localStorage.removeItem("emails"); localStorage.clear(); $(window).bind('storage', function (event) { if (event.key == null) { // clear event } else if (event.newValue == null) { // removeItem event } else { // setItem event } }); Friday, January 29, 2010
  • 66. Detection with MODERNIZR Friday, January 29, 2010
  • 67. ★ Input types ★ @font-face ★ Input attributes ★ border-image ★ <audio> and <video> ★ border-radius ★ <canvas> ★ box-shadow ★ <canvas> text ★ Multiple backgrounds ★ localStorage ★ opacity ★ sessionStorage ★ CSS animations, ★ Web Workers reflections & transforms ★ applicationCache ★ Columns ★ Geolocation API Friday, January 29, 2010
  • 68. Modernizr ★ Adds detection via CSS properties and JavaScript. ★ Attaches classes to <html> and creates a global Modernizr object. ★ Allows you to add your own tests. Friday, January 29, 2010
  • 69. /* Simulated box shadow using borders: */ div.somediv { border-bottom: 1px solid #666; border-right: 1px solid #777; } .boxshadow div.somediv { border: none; box-shadow: #666 1px 1px 1px; -moz-box-shadow: #666 1px 1px 1px; -webkit-box-shadow: #666 1px 1px 1px; } Friday, January 29, 2010
  • 70. if (!Modernizr.inputtypes.date){ $("input[type='date']").datepicker(); } Friday, January 29, 2010
  • 71. The Future of HTML Friday, January 29, 2010
  • 73. Find out more at: http://crnixon.org http://pinboard.in/u:crnixon/t:html5/ or email me at clinton.nixon@viget.com. Friday, January 29, 2010