SlideShare una empresa de Scribd logo
1 de 124
HIGHEDWEB                                   2012



HTML5+CSS
W O R K S H O P
                        !


Christopher Schmitt | http://twitter.com/@teleject
THINGS ARE GOOD
BETWEEN US, XHTML,
RIGHT?
I MEAN. WE GET ALONG WELL.
AND WE BOTH LIKE STUFF.
               2
               3
http://dev.opera.com/articles/view/mama-markup-validation-report/




                                3
4
“THE ATTEMPT TO GET THE
 WORLD TO SWITCH TO XML,
INCLUDING QUOTES AROUND
   ATTRIBUTE VALUES AND
 SLASHES IN EMPTY TAGS AND
  NAMESPACES ALL AT ONCE
       DIDN’T WORK.”
 SIR TIM BERNERS-LEE
            5
http://www.flickr.com/photos/teleject/432030263/
                       6
7
http://microformats.org/
           8
9
10
11
BLUEPRINTS VS REALITY




 http://www.amazon.com/gp/product/0140139966
                      12
“TAKE CARE
   OF THE LUXURIES AND
 THE NECESSITIES WILL TAKE
  CARE OF THEMSELVES.”
FRANK LLOYD WRIGHT

            13
AGENDA ITEMS

• What’s    different from XHTML to HTML5

• Why   are you here? http://goo.gl/ozNbH (You are here.)

  • HTML5, then    coding with HTML5

  • CSS3, then   coding with CSS3

• Prizes!        http://interactwithwebstandards.com/


                                    14
BUILDING
WITH HTML5
    15
DOCTYPE



   16
HTML 4.01 Transitional DTD:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

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




                               17
<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="utf-8">
 <title>AUSTIN, TX BBQ RESTAURANTS</title>
</head>
<body>
 <h1>....</h1>
 <p>...</p>
 </body>
</html>

                     18
EXERCISE
•   Go to HTML validator at
    http://validator.w3.org/#validate_by_input

•   Then type the following HTML (below) and hit validate:

                <!DOCTYPE html>
                <title>Small HTML5</title>
                <p>Hello world</p>




                                     19
20
21
CHARACTER SET



      22
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8" />




                  23
<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="utf-8">
 <title>AUSTIN, TX BBQ RESTAURANTS</title>
</head>
<body>
 <h1>....</h1>
 <p>...</p>
 </body>
</html>
 http://shiflett.org/blog/2005/dec/googles-xss-vulnerability.
                             24
SPECIFY YOUR
 LANGUAGE



     25
<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="utf-8">
 <title>AUSTIN, TX BBQ RESTAURANTS</title>
</head>
<body>
 <h1>....</h1>
 <p>...</p>
 </body>
</html>

                     26
INCLUDING
<SCRIPT> & <STYLE>



        27
<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="utf-8">
 <link rel="stylesheet" href="styles.css" />
 <script src="scripts.js"></script>
 <title>AUSTIN, TX BBQ RESTAURANTS</title>
</head>
<body>
 <h1>....</h1>
 <p>...</p>
 </body>
                     28
SYNTAX



  29
<img src=“file.png” />



          30
<IMG SRC=file.png />



         31
<iMg SrC=file.png />



         32
<IMG SRC=file.png />



         33
<video controls=controls>




            34
EVERYTHING THAT
WAS BAD IN 1999
IS GOOD AGAIN




           35
RELEARNING SYNTAX
•   Attribute quotes “not really” required

•   UPPERCASE and lowercase HTML elements allowed

    •   So is CaMeLcAse typing.

•   No more need to do self-closing tags like <IMG /> or <BR />

•   Also, no more minimalization. So, this is okay: <dl compact>

•   Basically, everything that was bad from HTML4 in XHTML5 is good again.

    •   Full circle, baby! One more time.

                                            36
BRINGING BACK <B>
 AND OTHER TAGS



        37
<p>My name is
<em>Jane</em>, not
    John.</p>


        38
<p>Sally thought to
herself, <i>when will IE6
     die?</i></p>


            39
<p><strong>Registration is
required</strong> for this
       event.</p>


            40
<p><b>Once upon a
time,</b> there was a man
  who lost his mind.</p>


            41
<p><small>The owner of
this blog is not responsible
 for mind blowage. Please
   consume at your own
     risk.</small></p>

             42
<abbr title="Accessible
    Rich Internet
Applications">ARIA</
         abbr>

      No more <acronym>
              43
THE COOLEST THING
EVER ABOUT HTML5.
      (TO ME.)


        44
<h1>
<a href="http://example.com">
 HTML5, for Fun &amp; Profit
</a>
</h1>

<a href="http://example.com">
<img src="logo.png" alt="HTML5 for
Fun and Profit" />
</a>

                 45
<a href="http://example.com">
<h1>HTML5, for Fun &amp; Profit</
h1>
<img src="logo.png" alt="HTML5 for
Fun and Profit" />
</a>



                 46
FIGURES & CAPTIONS



        47
<figure>
! <img src="chart.png" alt="Chart of
increasing awesomeness" />
! <figcaption>The increasing amount of
awesome that this blog
demonstrates.</figcaption>
</figure>


                  48
FIGURE

•   Not restricted to containing IMGs

    •   Tables

    •   Audio

    •   Video

    •   Charts

    •   Code snippets

                                        49
COLLAPSABLE CONTENT



         50
51
<details>
 <summary>Upcoming Topics</summary>
 <p>For the new year, we have a great line up
of articles!</p>
 <ul>
 <li>Understanding the
Outline Algorithm</li>
 <li>When to Use
! <code>hgroup</code></li>
 <li>Machine Semantics with Microdata</li>
</ul>
</details>
Only works in Chrome; all others - https://gist.github.com/370590
                               52
NUMBERING
  LISTS



    53
54
<ol start="3">
<li>Apples</li>
<li>Oranges</li>
<li>Bananas</li>
</ol>




                   55
56
<p>The results are in for your favorite fruit,
and we have a tie for first place!</p>
<ol>
<li value="1">Bananas</li>
<li value="1">Oranges</li>
<li value="2">Apples</li>
</ol>




                       57
EDITABLE ELEMENTS



        58
59
<div contenteditable>
<p>Quick Fox Jumped Over the Lazy Dog</
p>
</div>




                    60
DRAG N DROP



     61
<h2 draggable>Block-Level Links</h2>




      http://html5doctor.com/native-drag-and-drop/
                           62
HTML5, MICROFORMATS
    & METADATA



         63
64
“Designed for humans first and
       machines second,
microformats are a set of simple,
 open data formats built upon
      existing and widely
      adopted standards.”




               65
“HTML design patterns for common
chunks of content that web builders need
           to markup anyway.”

“Oh, and Google understands them, too.”




                   66
67
REPLACING ABBR

•   <ABBR> element is used by screenreaders to expand abbreviations
    like “lbs” or “NCAAP”

•   However unintended consequences occurred trying to workaround
    browser bugs for other HTML elements

•   What happens when a screenreaders text like this:

    •   “Let’s go to <abbr class="geo"
        title="30.300474;-97.747247">Austin, TX</abbr>”


    http://www.brucelawson.co.uk/2009/microformats-accessibility-html-5-again/
                                        68
<div class="vevent">
 <a class="url" href="http://www.web2con.com/">http://
www.web2con.com</a>
 <span class="summary">Web 2.0 Conference</span>:
 <abbr class="dtstart"
title="2007-10-05">October 5</abbr>-
 <abbr class="dtend" title="2007-10-20">20</
abbr>,
at the <span class="location">Argent Hotel, San Francisco,
CA</span>
</div>


                            69
<div class="vevent">
 <a class="url" href="http://www.web2con.com/">http://
www.web2con.com</a>
 <span class="summary">Web 2.0 Conference</span>:
 <time class="dtstart"
datetime="2007-10-05">October 5</time>-
 <time class="dtend"
datetime="2007-10-19">19</time>,
at the <span class="location">Argent Hotel, San Francisco,
CA</span>
</div>


http://www.brucelawson.co.uk/2009/microformats-accessibility-html-5-again/
                                    70
POSTSCRIPT


•   <ABBR> issue has ben resolved with new pattern (dropping <ABBR>
    altogether):
    http://microformats.org/wiki/value-class-pattern

    •   <p>Let’s go to <span class="geo">51° 30' 48.45", -0° 8'
        53.23" (<span class="value">51.513458;-0.14812</
        span>)</span> </p>



                                    71
DATA-ATTRIBUTE

•   You can set data-attribute to any element you want.

•   Set meta information that can be utilized by JavaScript or CSS later on.

                <img src=“john-smith.jpg”
                data-imgtype=“mugshot”
                alt=“John Smith’s mugshot”>




                                       72
ATTR SELECTOR


img[data-imgtype=“mugshot”] {
/* CSS rules go here */
}




              73
PAGE STRUCTURE



      74
DIV ID=“header”
               DIV ID=“nav”


DIV ID=“section”




                           DIV ID=“sidecolumn”
DIV ID=“article”




              DIV ID=“footer”
                    75
<HEADER>
             <NAV>


<SECTION>




                       <ASIDE>
<ARTICLE>




            <FOOTER>
               76
ARTICLE VS ASIDE VS
                 SECTION

•   Marc Grabsanki says:

    •   Article is unique content to that document

    •   Section is a thematic grouping of content, typically with a heading -
        pretty generic

    •   Aside is content that is tangentially related, like a sidebar
        div has no meaning whatsoever, so there is nothing semantic about
        divs

                                      77
ARTICLE VS ASIDE VS
                    SECTION
•   Bruce Lawson says:

    •   Aside is for something tangentially related to its parent element. Or, if a
        sibling to the main content, it can be used to make sidebars of navigation,
        recent comments, colophons, author bios etc.

    •   Article is a discrete piece of content that could be syndicated - a blog
        post, a news item, a comment, a widget

    •   Section can also contain articles. for example, you could have a page with a
        <section> full of entertainment articles, and a section of political news etc.

                                            78
ARTICLE VS ASIDE VS
                   SECTION

•   Molly Holzschlag, Opera standards evangelist, says:

    •   <section> clarifies <div>

    •   <article> 'replaces' <div id="content">

    •   <aside> 'replaces' <div id="sidebar">

•   Chris Mills, Opera browser employee, plays it safe:
    http://boblet.tumblr.com/post/130610820/html5-structure1

                                       79
WHAT ABOUT THE DIVS?

•   Marc Grabanski, jQuery and HTML5 guy:

    •   “div has no meaning whatsoever, so there is nothing semantic about
        divs”

•   Bruce Lawson, Opera browser employee:

    •   “Like all semantic questions, it depends on the context. If your only
        reason for wanting an element is to group stuff for styling, it's a div.”


                                          80
<body>
 <header>
 <h1>Heading </h1>
 </header>
 <nav>
 <h3>Site Navigation</h3>
 <ul>...</ul>!
 </nav>
 <section>
  <article>
 <h3>Weblog Entry</h3>
  </article>
 </section>!
 <aside>
  <p>You are reading "Chocolate Rain", an entry posted on <time datetime="2009-03-05">5
March, 2009</time>, to the <a href="#">Misty collection</a>. See other posts in <a
href="#">this collection</a>.</p>
 </aside>
 <footer>
 <p>...</p>
 </footer>
</body>

                                           81
82
83
<script type="text/javascript">
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
</script>




              http://ejohn.org/blog/html5-shiv/
                             84
85
PROGRESSIVELY
ENHANCED HTML5
(INFUSED WITH SHIM)


         86
87
http://modernizr.com/
          88
<script src="-/js/modernizr.min.js" type="text/
javascript" ></script>




                          89
<html lang="en" class=" canvas canvastext
geolocation rgba hsla multiplebgs borderimage
borderradius boxshadow opacity cssanimations
csscolumns cssgradients cssreflections
csstransforms csstransforms3d csstransitions
video audio localstorage sessionstorage
webworkers applicationcache fontface">




                       90
.audio #error {
 display: none;
}
.no-audio #error-box {
 background-color: #ffffcc;
 padding: 1px 10px;
 color: #000;
 border: 5px solid #ffff66;
}



                  CSS Feature Detection
                              91
<script>
if (Modernizr.audio) {
 function playPause() {
  var myAudio = document.getElementsByTagName('audio')
[0];
if(myAudio.paused)
 myAudio.play();
  else
 myAudio.pause();
}
}
</script>
                 JS Feature Detection
                          92
Modernizr.load({
  test: Modernizr.geolocation,
  yep : 'geo.js',
  nope: 'geo-polyfill.js'
});




                    JS Feature Detection
                                 93
94
Pick and Choose Features to Detect
                95
AUDIO/VIDEO



     96
HTML5 AUDIO



     97
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Basic HTML5 Web Document Structure</title>
! </head>
! <body>
<h1>Video Example</h1>
<audio src="html5test.ogg" autoplay controls>
! <a href="html5test.ogg">Download audio</a>
</audio>
! </body>
</html>



                              98
DEMO
 99
HTML5 AUDIO

•   AUDIO element attributes are SRC, AUTOBUFFER, AUTOPLAY,
    LOOP, CONTROLS

•   If you don’t have CONTROL, player becomes transparent




                                   100
HTML5 AUDIO SUPPORT

         FF3.5+   S4+         Ch3+   Op10.5+   IE9+

 Ogg
           Y                   Y       Y
Vorbis

MP3               Y            Y                Y


WAV        Y      Y                    Y

                        101
SUPPORTING AUDIO

<audio controls autobuffer>
 <source src="html5audio.mp3" />
 <source src="html5audio.ogg" />
 <!-- include Adobe Flash player EMBED and OBJECT code
here -->
</audio>




             Use Flash for older versions of IE
                             102
SUPPORTING AUDIO

•   If you do insert audio, setting the file to autoplay is not recommended,
    as it interferes with the experience for web surfers using screen
    readers.

•   Don’t use WAV file type.

    •   Better to ship a compact disc to the user instead.




                                        103
HTML5 VIDEO



     104
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Basic HTML5 Web Document Structure</title>
!    </head>
!    <body>
<h1>Video Example</h1>
<object width="425" height="344"><param name="movie"
value="http://www.youtube.com/v/4GuKSqAg5xI&hl=en&fs=1"></
param><param name="allowFullScreen" value="true"></
param><param name="allowscriptaccess" value="always"></
param><embed src="http://www.youtube.com/v/
4GuKSqAg5xI&hl=en&fs=1" type="application/x-shockwave-flash"
allowscriptaccess="always" allowfullscreen="true" width="425"
height="344"></embed></object>
!    </body>
</html>



                              105
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Basic HTML5 Web Document Structure</title>
! </head>
! <body>
<h1>Video Example</h1>
<video src="html5test.ogg"
! width="320" height="240" controls
! poster="html5testvideoposter.jpg">
! <a href="html5testvideo.ogg">Download movie</a>
</video>
! </body>
</html>


                               106
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Basic HTML5 Web Document Structure</title>
! </head>
! <body>
<h1>Video Example</h1>
<video src="html5test.ogg"
! width="320" height="240" controls
! poster="html5testvideoposter.jpg">



          DEMO
! <a href="html5testvideo.ogg">Download movie</a>
</video>
! </body>
</html>


                               107
HTML5 VIDEO

•   WIDTH and HEIGHT should be required, IMO, but movie plays anyway
    based on the values in the video file itself.

•   Video formats may have their own posterframe. The browser should
    use that by default unless overridden by valid POSTER attribute value.

•   Text can be included within VIDEO element to allow user to download
    video if their browser doesn’t support.

•   If you want to give users control, use CONTROL attribute.

                                      108
HTML5 VIDEO


•   Video can start automatically if using the AUTOPLAY=”1” attribute and
    value.

•   Spec provides for LOOP, AUTOBUFFER which also take a value of O
    or 1.

•   Codecs support...



                                    109
HTML5 VIDEO
“It would be helpful for interoperability if all browsers could
support the same codecs.
However, there are no known codecs that satisfy all the
current players: we need a codec that is known to not require
per-unit or per-distributor licensing, that is compatible with the
open source development model, that is of sufficient quality as
to be usable, and that is not an additional submarine patent
risk for large companies.
This is an ongoing issue and this section will be updated once
more information is available.”
- http://www.whatwg.org/specs/web-apps/current-work/#video-and-
                 audio-codecs-for-video-elements
                                110
CODECS
•   Ogg (or “Vorbis”)

    •   No need to worry about patents

•   H.264

    •   Created by the MPEG group

    •   If you have blu-ray disc player, you are using it

•   WebM

    •   A wrapper for the VP8 video and Ogg audio streams

                                          111
VIDEO CODEC SUPPORT

        FF3.6+   S         Ch5+     Op10.6+   IE9+


Ogg       Y                  Y        Y


H.264            Y          Y*                 Y


WebM (W4.02+)              (Ch6+)     Y


                     112
LESSONS LEARNED
•   To get most <video> support, you need 2 video files: H.264
    and .OGG.

    •   iOS Devices can handle MP4 (H.264)

    •   Safari, IE, Flash can deliver MP4 (H.264)

    •   Firefox, Opera can deliver .OGG

    •   Then hit them with FLV video, which supports H.264

        http://camendesign.com/code/video_for_everybody


                                      113
http://firefogg.org/


        114
http://www.videolan.org/vlc/
             115
http://handbrake.fr/


         116
LESSONS LEARNED

•   Use VLC or Firefogg to encode common movie files types to OGG

•   H.264 encoding? Use Handbrake

•   If you are hot to trot for HTML5 Video, like, right now, check out Mark
    Pilgrim’s tutorial:
    http://diveintohtml5.org/video.html

    •   Good primer:
        http://dev.opera.com/articles/view/introduction-html5-video/


                                       117
118
119
!   <script>
!   function playPause() {
!     var myVideo = document.getElementsByTagName('video')[0];
!     if (myVideo.paused)
!       myVideo.play();
!     else
!       myVideo.pause();
!   }
!   </script>




                                 120
<input type=button onclick="playPause()" value="Play/Pause"
tabindex="0" />




                               121
XHTML, ...I THINK I WANT TO SEE
ANOTHER MARKUP SPEC.
                  122
RECOMMENDED

         Design for Web Applications by Matt May and Wendy
• Universal
 Chisholm

• Bulletproof Ajax   by Jeremy Keith

• Designing   with Progressive Enhancement by Filament Group

• Microformats   Made Simple by Emily Lewis

• HTML5   Cookbook by a whole bunch of people!

                                       123
THANK YOU!
   Christopher Schmitt
schmitt@heatvision.com
http://twitter.com/teleject
             125

Más contenido relacionado

La actualidad más candente

CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
Zoe Gillenwater
 

La actualidad más candente (20)

Html5 public
Html5 publicHtml5 public
Html5 public
 
Css3
Css3Css3
Css3
 
HTML5 and the web of tomorrow!
HTML5  and the  web of tomorrow!HTML5  and the  web of tomorrow!
HTML5 and the web of tomorrow!
 
HTML5
HTML5HTML5
HTML5
 
CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks
 
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
 
jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Real World Web Standards
Real World Web StandardsReal World Web Standards
Real World Web Standards
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009
 
[In Control 2010] HTML5
[In Control 2010] HTML5[In Control 2010] HTML5
[In Control 2010] HTML5
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By Palash
 
Improving the Responsive Web Design Process in 2016
Improving the Responsive Web Design Process in 2016Improving the Responsive Web Design Process in 2016
Improving the Responsive Web Design Process in 2016
 
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using BootstrapStop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
 
Don't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web ApplicationsDon't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web Applications
 
Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and Rendering
 
[amigos] HTML5 and CSS3
[amigos] HTML5 and CSS3[amigos] HTML5 and CSS3
[amigos] HTML5 and CSS3
 

Destacado

Destacado (8)

2020vision Case Praxis
2020vision Case Praxis2020vision Case Praxis
2020vision Case Praxis
 
Hr Summit 03 26 09
Hr Summit 03 26 09Hr Summit 03 26 09
Hr Summit 03 26 09
 
AlphaTech Brochure
AlphaTech BrochureAlphaTech Brochure
AlphaTech Brochure
 
Web Communications Brochure
Web Communications BrochureWeb Communications Brochure
Web Communications Brochure
 
[HEWEBAR 2012] Adaptive Images in Responsive Web Design
[HEWEBAR 2012] Adaptive Images in Responsive Web Design[HEWEBAR 2012] Adaptive Images in Responsive Web Design
[HEWEBAR 2012] Adaptive Images in Responsive Web Design
 
Guided reading implementation guide
Guided reading implementation guideGuided reading implementation guide
Guided reading implementation guide
 
Open Office Impress : Lesson 08
Open Office Impress : Lesson 08Open Office Impress : Lesson 08
Open Office Impress : Lesson 08
 
Blooms Planning Sheet
Blooms Planning SheetBlooms Planning Sheet
Blooms Planning Sheet
 

Similar a [heweb11] HTML5 Makeover

Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)
Ontico
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designers
Pai-Cheng Tao
 

Similar a [heweb11] HTML5 Makeover (20)

[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!
 
The Devil and HTML5
The Devil and HTML5The Devil and HTML5
The Devil and HTML5
 
TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
Html5
Html5Html5
Html5
 
Take Your Markup to 11
Take Your Markup to 11Take Your Markup to 11
Take Your Markup to 11
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
 
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages ApplicationsIBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
 
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
 
Artdm171 Week4 Tags
Artdm171 Week4 TagsArtdm171 Week4 Tags
Artdm171 Week4 Tags
 
Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)
 
Front End Best Practices
Front End Best PracticesFront End Best Practices
Front End Best Practices
 
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designers
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 Boilerplate
 
Advanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & EfficiencyAdvanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & Efficiency
 
Presentation html5 css3 by thibaut
Presentation html5 css3 by thibautPresentation html5 css3 by thibaut
Presentation html5 css3 by thibaut
 
Diazo: Bridging Designers and Programmers
Diazo: Bridging Designers and ProgrammersDiazo: Bridging Designers and Programmers
Diazo: Bridging Designers and Programmers
 

Más de Christopher Schmitt

[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[rwdsummit] Adaptive Images in Responsive Web Design
[rwdsummit] Adaptive Images in Responsive Web Design[rwdsummit] Adaptive Images in Responsive Web Design
[rwdsummit] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code
Christopher Schmitt
 
[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[parisweb] Adaptive Images in Responsive Web Design
[parisweb] Adaptive Images in Responsive Web Design[parisweb] Adaptive Images in Responsive Web Design
[parisweb] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design
Christopher Schmitt
 
[wvbcn] Adaptive Images in Responsive Web Design
[wvbcn] Adaptive Images in Responsive Web Design[wvbcn] Adaptive Images in Responsive Web Design
[wvbcn] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
GitHub for People Who Don't Code
GitHub for People Who Don't CodeGitHub for People Who Don't Code
GitHub for People Who Don't Code
Christopher Schmitt
 
[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design
Christopher Schmitt
 
[sxsw2013] Extremely Compressed JPEGs
[sxsw2013] Extremely Compressed JPEGs[sxsw2013] Extremely Compressed JPEGs
[sxsw2013] Extremely Compressed JPEGs
Christopher Schmitt
 

Más de Christopher Schmitt (20)

Keeping Colors from Killing Your Product
Keeping Colors from Killing Your ProductKeeping Colors from Killing Your Product
Keeping Colors from Killing Your Product
 
[funka] Adaptive Images in Responsive Web Design
[funka] Adaptive Images in Responsive Web Design[funka] Adaptive Images in Responsive Web Design
[funka] Adaptive Images in Responsive Web Design
 
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
[Austin WordPress Meetup] Adaptive Images in Responsive Web Design
 
[CSSDevConf] Adaptive Images in Responsive Web Design 2014
[CSSDevConf] Adaptive Images in Responsive Web Design 2014[CSSDevConf] Adaptive Images in Responsive Web Design 2014
[CSSDevConf] Adaptive Images in Responsive Web Design 2014
 
[rwdsummit] Adaptive Images in Responsive Web Design
[rwdsummit] Adaptive Images in Responsive Web Design[rwdsummit] Adaptive Images in Responsive Web Design
[rwdsummit] Adaptive Images in Responsive Web Design
 
[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code
 
[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design
 
[parisweb] Adaptive Images in Responsive Web Design
[parisweb] Adaptive Images in Responsive Web Design[parisweb] Adaptive Images in Responsive Web Design
[parisweb] Adaptive Images in Responsive Web Design
 
[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design[peachpit] Adaptive Images in Responsive Web Design
[peachpit] Adaptive Images in Responsive Web Design
 
[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design
 
[wvbcn] Adaptive Images in Responsive Web Design
[wvbcn] Adaptive Images in Responsive Web Design[wvbcn] Adaptive Images in Responsive Web Design
[wvbcn] Adaptive Images in Responsive Web Design
 
[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design[drupalcampatx] Adaptive Images in Responsive Web Design
[drupalcampatx] Adaptive Images in Responsive Web Design
 
[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design
 
[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design[psuweb] Adaptive Images in Responsive Web Design
[psuweb] Adaptive Images in Responsive Web Design
 
GitHub for People Who Don't Code
GitHub for People Who Don't CodeGitHub for People Who Don't Code
GitHub for People Who Don't Code
 
[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design[wcatx] Adaptive Images in Responsive Web Design
[wcatx] Adaptive Images in Responsive Web Design
 
[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design[HEWEBFL] Adaptive Images in Responsive Web Design
[HEWEBFL] Adaptive Images in Responsive Web Design
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design
 
[sxsw2013] Extremely Compressed JPEGs
[sxsw2013] Extremely Compressed JPEGs[sxsw2013] Extremely Compressed JPEGs
[sxsw2013] Extremely Compressed JPEGs
 
[html5tx] Adaptive Images in Responsive Web Design
[html5tx] Adaptive Images in Responsive Web Design[html5tx] Adaptive Images in Responsive Web Design
[html5tx] Adaptive Images in Responsive Web Design
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

[heweb11] HTML5 Makeover

  • 1. HIGHEDWEB 2012 HTML5+CSS W O R K S H O P ! Christopher Schmitt | http://twitter.com/@teleject
  • 2. THINGS ARE GOOD BETWEEN US, XHTML, RIGHT? I MEAN. WE GET ALONG WELL. AND WE BOTH LIKE STUFF. 2 3
  • 4. 4
  • 5. “THE ATTEMPT TO GET THE WORLD TO SWITCH TO XML, INCLUDING QUOTES AROUND ATTRIBUTE VALUES AND SLASHES IN EMPTY TAGS AND NAMESPACES ALL AT ONCE DIDN’T WORK.” SIR TIM BERNERS-LEE 5
  • 7. 7
  • 9. 9
  • 10. 10
  • 11. 11
  • 12. BLUEPRINTS VS REALITY http://www.amazon.com/gp/product/0140139966 12
  • 13. “TAKE CARE OF THE LUXURIES AND THE NECESSITIES WILL TAKE CARE OF THEMSELVES.” FRANK LLOYD WRIGHT 13
  • 14. AGENDA ITEMS • What’s different from XHTML to HTML5 • Why are you here? http://goo.gl/ozNbH (You are here.) • HTML5, then coding with HTML5 • CSS3, then coding with CSS3 • Prizes! http://interactwithwebstandards.com/ 14
  • 16. DOCTYPE 16
  • 17. HTML 4.01 Transitional DTD: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> XHTML 1.0 Transitional DTD: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 17
  • 18. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>AUSTIN, TX BBQ RESTAURANTS</title> </head> <body> <h1>....</h1> <p>...</p> </body> </html> 18
  • 19. EXERCISE • Go to HTML validator at http://validator.w3.org/#validate_by_input • Then type the following HTML (below) and hit validate: <!DOCTYPE html> <title>Small HTML5</title> <p>Hello world</p> 19
  • 20. 20
  • 21. 21
  • 24. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>AUSTIN, TX BBQ RESTAURANTS</title> </head> <body> <h1>....</h1> <p>...</p> </body> </html> http://shiflett.org/blog/2005/dec/googles-xss-vulnerability. 24
  • 26. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>AUSTIN, TX BBQ RESTAURANTS</title> </head> <body> <h1>....</h1> <p>...</p> </body> </html> 26
  • 28. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="styles.css" /> <script src="scripts.js"></script> <title>AUSTIN, TX BBQ RESTAURANTS</title> </head> <body> <h1>....</h1> <p>...</p> </body> 28
  • 35. EVERYTHING THAT WAS BAD IN 1999 IS GOOD AGAIN 35
  • 36. RELEARNING SYNTAX • Attribute quotes “not really” required • UPPERCASE and lowercase HTML elements allowed • So is CaMeLcAse typing. • No more need to do self-closing tags like <IMG /> or <BR /> • Also, no more minimalization. So, this is okay: <dl compact> • Basically, everything that was bad from HTML4 in XHTML5 is good again. • Full circle, baby! One more time. 36
  • 37. BRINGING BACK <B> AND OTHER TAGS 37
  • 38. <p>My name is <em>Jane</em>, not John.</p> 38
  • 39. <p>Sally thought to herself, <i>when will IE6 die?</i></p> 39
  • 41. <p><b>Once upon a time,</b> there was a man who lost his mind.</p> 41
  • 42. <p><small>The owner of this blog is not responsible for mind blowage. Please consume at your own risk.</small></p> 42
  • 43. <abbr title="Accessible Rich Internet Applications">ARIA</ abbr> No more <acronym> 43
  • 44. THE COOLEST THING EVER ABOUT HTML5. (TO ME.) 44
  • 45. <h1> <a href="http://example.com"> HTML5, for Fun &amp; Profit </a> </h1> <a href="http://example.com"> <img src="logo.png" alt="HTML5 for Fun and Profit" /> </a> 45
  • 46. <a href="http://example.com"> <h1>HTML5, for Fun &amp; Profit</ h1> <img src="logo.png" alt="HTML5 for Fun and Profit" /> </a> 46
  • 48. <figure> ! <img src="chart.png" alt="Chart of increasing awesomeness" /> ! <figcaption>The increasing amount of awesome that this blog demonstrates.</figcaption> </figure> 48
  • 49. FIGURE • Not restricted to containing IMGs • Tables • Audio • Video • Charts • Code snippets 49
  • 51. 51
  • 52. <details> <summary>Upcoming Topics</summary> <p>For the new year, we have a great line up of articles!</p> <ul> <li>Understanding the Outline Algorithm</li> <li>When to Use ! <code>hgroup</code></li> <li>Machine Semantics with Microdata</li> </ul> </details> Only works in Chrome; all others - https://gist.github.com/370590 52
  • 54. 54
  • 56. 56
  • 57. <p>The results are in for your favorite fruit, and we have a tie for first place!</p> <ol> <li value="1">Bananas</li> <li value="1">Oranges</li> <li value="2">Apples</li> </ol> 57
  • 59. 59
  • 60. <div contenteditable> <p>Quick Fox Jumped Over the Lazy Dog</ p> </div> 60
  • 62. <h2 draggable>Block-Level Links</h2> http://html5doctor.com/native-drag-and-drop/ 62
  • 63. HTML5, MICROFORMATS & METADATA 63
  • 64. 64
  • 65. “Designed for humans first and machines second, microformats are a set of simple, open data formats built upon existing and widely adopted standards.” 65
  • 66. “HTML design patterns for common chunks of content that web builders need to markup anyway.” “Oh, and Google understands them, too.” 66
  • 67. 67
  • 68. REPLACING ABBR • <ABBR> element is used by screenreaders to expand abbreviations like “lbs” or “NCAAP” • However unintended consequences occurred trying to workaround browser bugs for other HTML elements • What happens when a screenreaders text like this: • “Let’s go to <abbr class="geo" title="30.300474;-97.747247">Austin, TX</abbr>” http://www.brucelawson.co.uk/2009/microformats-accessibility-html-5-again/ 68
  • 69. <div class="vevent"> <a class="url" href="http://www.web2con.com/">http:// www.web2con.com</a> <span class="summary">Web 2.0 Conference</span>: <abbr class="dtstart" title="2007-10-05">October 5</abbr>- <abbr class="dtend" title="2007-10-20">20</ abbr>, at the <span class="location">Argent Hotel, San Francisco, CA</span> </div> 69
  • 70. <div class="vevent"> <a class="url" href="http://www.web2con.com/">http:// www.web2con.com</a> <span class="summary">Web 2.0 Conference</span>: <time class="dtstart" datetime="2007-10-05">October 5</time>- <time class="dtend" datetime="2007-10-19">19</time>, at the <span class="location">Argent Hotel, San Francisco, CA</span> </div> http://www.brucelawson.co.uk/2009/microformats-accessibility-html-5-again/ 70
  • 71. POSTSCRIPT • <ABBR> issue has ben resolved with new pattern (dropping <ABBR> altogether): http://microformats.org/wiki/value-class-pattern • <p>Let’s go to <span class="geo">51° 30' 48.45", -0° 8' 53.23" (<span class="value">51.513458;-0.14812</ span>)</span> </p> 71
  • 72. DATA-ATTRIBUTE • You can set data-attribute to any element you want. • Set meta information that can be utilized by JavaScript or CSS later on. <img src=“john-smith.jpg” data-imgtype=“mugshot” alt=“John Smith’s mugshot”> 72
  • 75. DIV ID=“header” DIV ID=“nav” DIV ID=“section” DIV ID=“sidecolumn” DIV ID=“article” DIV ID=“footer” 75
  • 76. <HEADER> <NAV> <SECTION> <ASIDE> <ARTICLE> <FOOTER> 76
  • 77. ARTICLE VS ASIDE VS SECTION • Marc Grabsanki says: • Article is unique content to that document • Section is a thematic grouping of content, typically with a heading - pretty generic • Aside is content that is tangentially related, like a sidebar div has no meaning whatsoever, so there is nothing semantic about divs 77
  • 78. ARTICLE VS ASIDE VS SECTION • Bruce Lawson says: • Aside is for something tangentially related to its parent element. Or, if a sibling to the main content, it can be used to make sidebars of navigation, recent comments, colophons, author bios etc. • Article is a discrete piece of content that could be syndicated - a blog post, a news item, a comment, a widget • Section can also contain articles. for example, you could have a page with a <section> full of entertainment articles, and a section of political news etc. 78
  • 79. ARTICLE VS ASIDE VS SECTION • Molly Holzschlag, Opera standards evangelist, says: • <section> clarifies <div> • <article> 'replaces' <div id="content"> • <aside> 'replaces' <div id="sidebar"> • Chris Mills, Opera browser employee, plays it safe: http://boblet.tumblr.com/post/130610820/html5-structure1 79
  • 80. WHAT ABOUT THE DIVS? • Marc Grabanski, jQuery and HTML5 guy: • “div has no meaning whatsoever, so there is nothing semantic about divs” • Bruce Lawson, Opera browser employee: • “Like all semantic questions, it depends on the context. If your only reason for wanting an element is to group stuff for styling, it's a div.” 80
  • 81. <body> <header> <h1>Heading </h1> </header> <nav> <h3>Site Navigation</h3> <ul>...</ul>! </nav> <section> <article> <h3>Weblog Entry</h3> </article> </section>! <aside> <p>You are reading "Chocolate Rain", an entry posted on <time datetime="2009-03-05">5 March, 2009</time>, to the <a href="#">Misty collection</a>. See other posts in <a href="#">this collection</a>.</p> </aside> <footer> <p>...</p> </footer> </body> 81
  • 82. 82
  • 83. 83
  • 85. 85
  • 87. 87
  • 90. <html lang="en" class=" canvas canvastext geolocation rgba hsla multiplebgs borderimage borderradius boxshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions video audio localstorage sessionstorage webworkers applicationcache fontface"> 90
  • 91. .audio #error { display: none; } .no-audio #error-box { background-color: #ffffcc; padding: 1px 10px; color: #000; border: 5px solid #ffff66; } CSS Feature Detection 91
  • 92. <script> if (Modernizr.audio) { function playPause() { var myAudio = document.getElementsByTagName('audio') [0]; if(myAudio.paused) myAudio.play(); else myAudio.pause(); } } </script> JS Feature Detection 92
  • 93. Modernizr.load({ test: Modernizr.geolocation, yep : 'geo.js', nope: 'geo-polyfill.js' }); JS Feature Detection 93
  • 94. 94
  • 95. Pick and Choose Features to Detect 95
  • 98. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Basic HTML5 Web Document Structure</title> ! </head> ! <body> <h1>Video Example</h1> <audio src="html5test.ogg" autoplay controls> ! <a href="html5test.ogg">Download audio</a> </audio> ! </body> </html> 98
  • 100. HTML5 AUDIO • AUDIO element attributes are SRC, AUTOBUFFER, AUTOPLAY, LOOP, CONTROLS • If you don’t have CONTROL, player becomes transparent 100
  • 101. HTML5 AUDIO SUPPORT FF3.5+ S4+ Ch3+ Op10.5+ IE9+ Ogg Y Y Y Vorbis MP3 Y Y Y WAV Y Y Y 101
  • 102. SUPPORTING AUDIO <audio controls autobuffer> <source src="html5audio.mp3" /> <source src="html5audio.ogg" /> <!-- include Adobe Flash player EMBED and OBJECT code here --> </audio> Use Flash for older versions of IE 102
  • 103. SUPPORTING AUDIO • If you do insert audio, setting the file to autoplay is not recommended, as it interferes with the experience for web surfers using screen readers. • Don’t use WAV file type. • Better to ship a compact disc to the user instead. 103
  • 104. HTML5 VIDEO 104
  • 105. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Basic HTML5 Web Document Structure</title> ! </head> ! <body> <h1>Video Example</h1> <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/4GuKSqAg5xI&hl=en&fs=1"></ param><param name="allowFullScreen" value="true"></ param><param name="allowscriptaccess" value="always"></ param><embed src="http://www.youtube.com/v/ 4GuKSqAg5xI&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object> ! </body> </html> 105
  • 106. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Basic HTML5 Web Document Structure</title> ! </head> ! <body> <h1>Video Example</h1> <video src="html5test.ogg" ! width="320" height="240" controls ! poster="html5testvideoposter.jpg"> ! <a href="html5testvideo.ogg">Download movie</a> </video> ! </body> </html> 106
  • 107. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Basic HTML5 Web Document Structure</title> ! </head> ! <body> <h1>Video Example</h1> <video src="html5test.ogg" ! width="320" height="240" controls ! poster="html5testvideoposter.jpg"> DEMO ! <a href="html5testvideo.ogg">Download movie</a> </video> ! </body> </html> 107
  • 108. HTML5 VIDEO • WIDTH and HEIGHT should be required, IMO, but movie plays anyway based on the values in the video file itself. • Video formats may have their own posterframe. The browser should use that by default unless overridden by valid POSTER attribute value. • Text can be included within VIDEO element to allow user to download video if their browser doesn’t support. • If you want to give users control, use CONTROL attribute. 108
  • 109. HTML5 VIDEO • Video can start automatically if using the AUTOPLAY=”1” attribute and value. • Spec provides for LOOP, AUTOBUFFER which also take a value of O or 1. • Codecs support... 109
  • 110. HTML5 VIDEO “It would be helpful for interoperability if all browsers could support the same codecs. However, there are no known codecs that satisfy all the current players: we need a codec that is known to not require per-unit or per-distributor licensing, that is compatible with the open source development model, that is of sufficient quality as to be usable, and that is not an additional submarine patent risk for large companies. This is an ongoing issue and this section will be updated once more information is available.” - http://www.whatwg.org/specs/web-apps/current-work/#video-and- audio-codecs-for-video-elements 110
  • 111. CODECS • Ogg (or “Vorbis”) • No need to worry about patents • H.264 • Created by the MPEG group • If you have blu-ray disc player, you are using it • WebM • A wrapper for the VP8 video and Ogg audio streams 111
  • 112. VIDEO CODEC SUPPORT FF3.6+ S Ch5+ Op10.6+ IE9+ Ogg Y Y Y H.264 Y Y* Y WebM (W4.02+) (Ch6+) Y 112
  • 113. LESSONS LEARNED • To get most <video> support, you need 2 video files: H.264 and .OGG. • iOS Devices can handle MP4 (H.264) • Safari, IE, Flash can deliver MP4 (H.264) • Firefox, Opera can deliver .OGG • Then hit them with FLV video, which supports H.264 http://camendesign.com/code/video_for_everybody 113
  • 117. LESSONS LEARNED • Use VLC or Firefogg to encode common movie files types to OGG • H.264 encoding? Use Handbrake • If you are hot to trot for HTML5 Video, like, right now, check out Mark Pilgrim’s tutorial: http://diveintohtml5.org/video.html • Good primer: http://dev.opera.com/articles/view/introduction-html5-video/ 117
  • 118. 118
  • 119. 119
  • 120. ! <script> ! function playPause() { ! var myVideo = document.getElementsByTagName('video')[0]; ! if (myVideo.paused) ! myVideo.play(); ! else ! myVideo.pause(); ! } ! </script> 120
  • 121. <input type=button onclick="playPause()" value="Play/Pause" tabindex="0" /> 121
  • 122. XHTML, ...I THINK I WANT TO SEE ANOTHER MARKUP SPEC. 122
  • 123. RECOMMENDED Design for Web Applications by Matt May and Wendy • Universal Chisholm • Bulletproof Ajax by Jeremy Keith • Designing with Progressive Enhancement by Filament Group • Microformats Made Simple by Emily Lewis • HTML5 Cookbook by a whole bunch of people! 123
  • 124. THANK YOU! Christopher Schmitt schmitt@heatvision.com http://twitter.com/teleject 125