SlideShare a Scribd company logo
LOOKING INTO HTML5+CSS3
  CHRISTOPHER SCHMITT | http://twitter.com/teleject
One Look at Flash
LOOKING INTO HTML5+CSS3
  CHRISTOPHER SCHMITT | http://twitter.com/teleject
THINGS ARE GOOD
BETWEEN US, XHTML, RIGHT?

        I MEAN.
  WE GET ALONG WELL.
 AND WE BOTH LIKE STUFF.
“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.”
     -TIM BERNERS-LEE
BLUEPRINTS VS REALITY
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
“TAKE CARE
  OF THE LUXURIES AND
THE NECESSITIES WILL TAKE
 CARE OF THEMSELVES.”
 -FRANK LLOYD WRIGHT
NEW HTML5 ELEMENTS
•   article         •   figure    •   progress
•   aside           •   footer   •   rp
•   audio           •   header   •   rt
•   canvas          •   hgroup   •   ruby
•   command         •   keygen   •   section
•   datalist        •   mark     •   source
•   details         •   meter    •   time
•   dialog          •   nav      •   video
•   embed           •   output
NEW HTML5 ELEMENTS
•   article         •   figure    •   progress
•   aside           •   footer   •   rp
•   audio           •   header   •   rt
•   canvas          •   hgroup   •   ruby
•   command         •   keygen   •   section
•   datalist        •   mark     •   source
•   details         •   meter    •   time
•   dialog          •   nav      •   video
•   embed           •   output
BASIC HTML5 LAYOUT
<!DOCTYPE HTML>
<HTML LANG="EN">
<HEAD>
 <META CHARSET="UTF-8">
 <TITLE>BASIC HTML5 WEB DOCUMENT STRUCTURE</TITLE>
</HEAD>
<BODY>
 <H1>....</H1>
 <P>...</P>
 </BODY>
</HTML>
<!DOCTYPE HTML>
 <TITLE>HTML5</TITLE>
 <P>HELLO WORLD</P>




http://validator.w3.org/check?uri=http%3A%2F%2Fjsbin.com
                       %2Fowata&ss=1
Looking into HTML5 + CSS3
DIV ID=”header”
              DIV ID=”nav”

DIV ID=”section”




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




             DIV ID=”footer”
HEADER
           NAV

SECTION




                   ASIDE
ARTICLE




          FOOTER
<BODY>
<HEADER>
 <H1>HEADING </H1>
</HEADER>
<NAV>
 <H3>SITE NAVIGATION</H3>
 <UL>...</UL>
</NAV>
<SECTION>
 <H3>WEBLOG ENTRY</H3>
 
<ARTICLE>
</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>
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
<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/
Looking into HTML5 + CSS3
BASIC CSS FORMATTING
HEADER
           NAV

SECTION




                   ASIDE
ARTICLE




          FOOTER
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
LESSONS LEARNED
• New   HTML5 elements are treated as inline elements.

  • Need    to use CSS property-value display:block

• IE6
    and IE7 need to be nudged to recognize HTML elements in
 order to have CSS be applied

  • document.createElement(‘html5element’);

  • Dean    Edwards IE7 script doesn’t help

  • There   isn’t a jQuery plugin to make it “easier”
LESSONS LEARNED


• For   Firefox 2 and Camino (Gecko 1.9)

  • HTML5       pages need to be served as XHTML

  • Content-Type: application/xhtml+xml;

  • ...Let   the irony set for a bit.
<?PHP
IF ( STRPOS($_SERVER['HTTP_USER_AGENT'], 'FIREFOX/2.0') > -1)
{
HEADER("CONTENT-TYPE: APPLICATION/XHTML+XML;
CHARSET=UTF-8");
ECHO'<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0
TRANSITIONAL//EN" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/
XHTML1-TRANSITIONAL.DTD">
<HTML XMLNS="HTTP://WWW.W3.ORG/1999/XHTML"
XML:LANG="EN" LANG="EN">';
}
ELSE {
ECHO '<!DOCTYPE HTML><HTML>';
}?>

                       http://tr.im/h0Rj
HTML5 AUDIO
<!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>
Looking into HTML5 + CSS3
HTML5 AUDIO

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

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

• Only    able to play OGG format in nightly build of Firefox.

   • Could   not get player to use MP3 audio
AUDIO FILE SUPPORT

                                      Chrome 3
             Firefox 3.5   Safari 4            Opera 10
                                        Beta

Ogg Vorbis       Y                       Y


  MP3                         Y          Y


  WAV            Y            Y                   Y
<!DOCTYPE HTML>
<HTML LANG="EN">
<HEAD>
<META CHARSET="UTF-8">
<TITLE>BASIC HTML5 WEB DOCUMENT STRUCTURE</TITLE>

   </HEAD>

   <BODY>

   
   <H1>VIDEO EXAMPLE</H1>

   
   <AUDIO CONTROLS AUTOBUFFER>
  
 
   
   <SOURCE SRC="HTML5AUDIO.OGG" />
  
 
   
   <SOURCE SRC="HTML5AUDIO.MP3" />
  
 
   
   <!-- INCLUDE ADOBE FLASH PLAYER EMBED AND OBJECT
CODE HERE -->

   
   </AUDIO>

   </BODY>
</HTML>
HTML5 VIDEO
<!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>
<!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>
VIDEO DEMOS


• Personal   demo

• http://tinyvid.tv/

• http://www.mozbox.org/jdll/video.xhtml
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.

• Alternative   text is placed inside VIDEO element.

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


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

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

• Codecs   support...
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
VIDEO CODEC SUPPORT
          Firefox 3.5   Safari   iPhone   Android Chrome 3


Theora
+Vorbis       Y                                      Y
 +Ogg
H.264
+AAC                      Y        Y        Y
+MP4

            http://diveintohtml5.org/video.html
LESSONS LEARNED
• Works    in nightly builds of Firefox (3.2b) and only for OGG
 format.

  • Other browsers that said they supported the VIDEO format I
   could not get to work on my machines.

• Used VLC    to encode common movie files types to OGG

• Toget cross-browser, you will need to encode in more than one
 file format. Is it really needed?

• People   really, really, really want this to work.
HTML5 AND MICROFORMATS
REPLACING ABBR
• ABBRis used by screenreaders to expand abbreviations like “lbs”
 or “NCAAP”

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

• What   happens when a screenreaders text like this:

  • “Let’sgo to <abbr class="geo"
   title="30.300474;-97.747247">Austin, TX</
   abbr>”
http://www.brucelawson.co.uk/2009/microformats-accessibility-html-5-again/
REPLACING ABBR
• ABBRis used by screenreaders to expand abbreviations like “lbs”
 or “NCAAP”

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

• What   happens when a screenreaders text like this:

  • “Let’sgo to <abbr class="geo"
   title="30.300474;-97.747247">Austin, TX</
   abbr>”
http://www.brucelawson.co.uk/2009/microformats-accessibility-html-5-again/
<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">19</ABBR>,
AT THE <SPAN CLASS="LOCATION">ARGENT HOTEL, SAN FRANCISCO, CA</SPAN>
</DIV>
<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-20">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/
HTML5 CANVAS
<CANVAS ID="MYCANVAS" WIDTH="300" HEIGHT="150">
FALLBACK CONTENT, IN CASE THE BROWSER DOES NOT SUPPORT CANVAS.
</CANVAS>
<SCRIPT TYPE="TEXT/JAVASCRIPT"><!--
WINDOW.ADDEVENTLISTENER('LOAD', FUNCTION () {
 // GET THE CANVAS ELEMENT.
 VAR ELEM = DOCUMENT.GETELEMENTBYID('MYCANVAS');
 IF (!ELEM || !ELEM.GETCONTEXT) {
   RETURN;
 }

 // GET THE CANVAS 2D CONTEXT.
 VAR CONTEXT = ELEM.GETCONTEXT('2D');
 IF (!CONTEXT) {
   RETURN;
 }

  // NOW YOU ARE DONE! LET'S DRAW A BLUE RECTANGLE.
  CONTEXT.FILLSTYLE = '#00F';
  CONTEXT.FILLRECT(0, 0, 150, 100);
}, FALSE);
// --></SCRIPT>
Looking into HTML5 + CSS3
// GET THE CANVAS ELEMENT.
VAR ELEM = DOCUMENT.GETELEMENTBYID('MYCANVAS');
IF (!ELEM || !ELEM.GETCONTEXT) {
  RETURN;
}

// GET THE CANVAS 2D CONTEXT.
VAR CONTEXT = ELEM.GETCONTEXT('2D');
IF (!CONTEXT) {
  RETURN;
}

 CONTEXT.FILLSTYLE = '#00F';
 CONTEXT.STROKESTYLE = '#F00';
 CONTEXT.LINEWIDTH = 4;

  // DRAW A RIGHT TRIANGLE.
  CONTEXT.BEGINPATH();
  CONTEXT.MOVETO(10, 10);
  CONTEXT.LINETO(100, 10);
  CONTEXT.LINETO(10, 100);
  CONTEXT.LINETO(10, 10);
  CONTEXT.FILL();
  CONTEXT.STROKE();
  CONTEXT.CLOSEPATH();
}, FALSE);
Looking into HTML5 + CSS3
// GET THE CANVAS ELEMENT.
VAR ELEM = DOCUMENT.GETELEMENTBYID('MYCANVAS');
IF (!ELEM || !ELEM.GETCONTEXT) {
  RETURN;
}

// GET THE CANVAS 2D CONTEXT.
VAR CONTEXT = ELEM.GETCONTEXT('2D');
IF (!CONTEXT) {
  RETURN;
}

 CONTEXT.FILLSTYLE = '#00F';
 CONTEXT.STROKESTYLE = '#F00';
 CONTEXT.LINEWIDTH = 4;

  // DRAW A RIGHT TRIANGLE.
  CONTEXT.BEGINPATH();
  CONTEXT.MOVETO(10, 10);
  CONTEXT.LINETO(100, 10);
  CONTEXT.LINETO(10, 100);
  CONTEXT.LINETO(10, 10);
  CONTEXT.FILL();
  CONTEXT.STROKE();
  CONTEXT.CLOSEPATH();
}, FALSE);
http://flickr.com/photos/dunstan/3099313036/
HTML5 AND LOCAL
DATABASE, APP CACHE,
   GEOLOCATION,
    YOUR PHONE
http://www.youtube.com/watch?v=VmjxmOtNZCk&fmt=18
DATABASE, APP CACHE,
          GEOLOCATION LINKS
•   W3C HTML5 Database Storage Specification:
    http://tr.im/h13y

•   W3C Geolocation API Specification:
    http://tr.im/h12L

•   W3C HTML5 Offline Web Applications:
    http://tr.im/h12z

•   Safari Dev Connection on HTML5 Offline Application Cache:
    http://tr.im/h12f

•   WebKit Does HTML5 Client-Side Storage:
    http://tr.im/h140
“HTML 5 IS A KLUDGE.”
  - BRUCE LAWSON
Looking into HTML5 + CSS3
LOOKING
  GOOD

  CSS3
“NEW” “CSS3” PROPERTIES
•   @font-face                        •   stretching images
•   text-shadow                       •   rotating images
•   background color opacity (RGBA)   •   setting gradients
•   text columns                      •   alpha transparent IMG
•   rounded corners                   •   box shadow
•   multiple images on one HTML       •   CSS masks
    element
                                      •   opacity on elements
•   setting images on borders
                                      •   CSS animation
TEXT COLUMNS
Looking into HTML5 + CSS3
<DIV ID="COLUMN">
<P>…<P>
<H2>…</H2>
<P>…<P>
<H2>…</H2>
<P>…<P>
</DIV>
#COLUMN {
 -MOZ-COLUMN-GAP: 3EM;
 -MOZ-COLUMN-WIDTH: 11EM;
 -WEBKIT-COLUMN-GAP: 3EM;
 -WEBKIT-COLUMN-WIDTH: 11EM;
 PADDING: 10PX;
}
#COLUMN {
 -MOZ-COLUMN-GAP: 3EM;
 -MOZ-COLUMN-WIDTH: 11EM;
 -MOZ-COLUMN-RULE: 1PX SOLID #CCC;
 -WEBKIT-COLUMN-GAP: 3EM;
 -WEBKIT-COLUMN-WIDTH: 11EM;
 -WEBKIT-COLUMN-RULE: 1PX SOLID #CCC;
 PADDING: 10PX;
}
LESSONS LEARNED


• Proprietary   CSS extensions in Firefox and Safari.

• JavaScriptsolution through a jQuery plugin:
 http://welcome.totheinter.net/2008/07/22/multi-column-layout-
 with-css-and-jquery/
OPACITY ON ELEMENTS
Looking into HTML5 + CSS3
#NUMBER4 {
  OPACITY: .4; /* .4 = 40% TRANSPARENCY */
  FILTER: ALPHA(OPACITY=40); /* 40 = 40% TRANSPARENCY */
}
LESSONS LEARNED
• Supported     in Firefox 1.5+, Opera 9+, Safari 1.2+ and Chrome.

• IE5.5+ requires the use of its own alpha filter in order for the
 effect to be cross-browser.

•A     drawback to using the opacity filter is that the value is inherited:

  • If   a parent element is set to be 10% transparent, the child
       elements’ transparency is also going to be 10%.

  • Watch     out for legibility issues within the Web page.
OPACITY
ON BACKGROUND COLORS
        (RGBA)
Looking into HTML5 + CSS3
#NUMBER4 {
 BACKGROUND-COLOR: RGBA(255, 255, 0, .4);
}
#NUMBER4 {
 BACKGROUND-COLOR: RGB(255, 255, 0);
 BACKGROUND-COLOR: RGBA(255, 255, 0, .4);
}
LESSONS LEARNED

• Firefox   3+, Opera 10+, and Safari support RGBA

• Requires   another background-color property for cross-browser
 support.

• IE   Support!
#NUMBER4 {
 BACKGROUND-COLOR: TRANSPARENT;
FILTER:PROGID:DXIMAGETRANSFORM.MICROSOFT.GRADIENT(STARTCO
LORSTR=#66FFFF00,ENDCOLORSTR=#66FFFF00);
}
LESSONS LEARNED
• First
     step is to convert the RGB value of the color to
 hexadecimal. In this example, rgb(255,255,0) converts to #FFFF00.

• Next, convert    the alpha transparency value to hexadecimal
 string . In this example, the value is 66.

  • E.g.,   alpha value of .3 equals 4D in hexadecimal values

• Then assemble the hexadecimal value for transparency and the
 color together in one string, starting with the transparency:
 #66FFFF00.
GRADIENTS,
BOX SHADOWS,
TEXT SHADOWS,
BORDER IMAGES
Looking into HTML5 + CSS3
#HEADER .BORDER {
 BORDER: 1PX SOLID #930;
 -WEBKIT-BORDER-IMAGE: URL(ZOD-BOX.PNG) 1 1 1 1 STRETCH
STRETCH;
 -MOZ-BORDER-IMAGE: URL(ZOD-BOX.PNG) 1 1 1 1 STRETCH STRETCH;
 PADDING: 7PX;
 }
 
 #HEADER .WRAP {
  COLOR: #FFF;
  COLOR: RGBA(255,255,255,.9);
  MIN-WIDTH: 250PX;
  TEXT-SHADOW: 0 -1PX 0 RGBA(0,0,0,.8);
 
   
  BOX-SHADOW: 3PX 3PX 19PX RGBA(0,0,0,.3);
  -WEBKIT-BOX-SHADOW: 3PX 3PX 19PX RGBA(0,0,0,.3);
  -MOZ-BOX-SHADOW: 3PX 3PX 19PX RGBA(0,0,0,.3);
  BACKGROUND: #930;
  BACKGROUND: -WEBKIT-GRADIENT(LINEAR, LEFT TOP, LEFT BOTTOM,
FROM(RGBA(153,51,0,.3)), TO(#6B3703), COLOR-STOP(0.5, #903000));
  BACKGROUND: -MOZ-LINEAR-GRADIENT(LEFT TOP, LEFT BOTTOM,
FROM(RGBA(153,51,0,.3)), TO(#6B3703), COLOR-STOP(0.5, #903000));
  PADDING: 14PX;
}
ANIMATIONS
@-WEBKIT-KEYFRAMES "CLOUDS" {
 FROM {
  RIGHT: 0PX;
 }
 TO {
  RIGHT: 100PX;
 }
}
#CLOUDS1 {
 WIDTH: 627PX;
 HEIGHT: 410PX;
 POSITION: ABSOLUTE;
 RIGHT: -300PX;
TOP: 0;
 BACKGROUND-IMAGE: URL(CLOUDS.PNG);
 -WEBKIT-TRANSFORM: TRANSLATE(300PX, 0PX);
 -WEBKIT-ANIMATION-NAME: "CLOUDS";
 -WEBKIT-ANIMATION-DURATION: 10S;
 -WEBKIT-ANIMATION-ITERATION-COUNT: 10;
 -WEBKIT-ANIMATION-DIRECTION: ALTERNATE;
}
Looking into HTML5 + CSS3
HTML5+CSS3 RESOURCES

• HTML5   Doctor
 http://html5doctor.com

• “When   Can I Use…”
 http://a.deveria.com/caniuse/

• Comparison   of Layout Engines
 (HTML5)
 http://en.wikipedia.org/wiki/
 Comparison_of_layout_engine
 s_(HTML_5)
THANK YOU!
   Christopher Schmitt
schmitt@heatvision.com
http://twitter.com/teleject
Creative Commons Citations

    http://www.flickr.com/photos/gurock20/459901107/
        http://www.flickr.com/photos/wili/214317898/
       http://www.flickr.com/photos/gadl/421838292/
     http://www.flickr.com/photos/tantek/1141384818/
  http://www.flickr.com/photos/bdougherty/3172618046/
http://dev.opera.com/articles/view/html-5-canvas-the-basics/

More Related Content

What's hot (20)

PDF
Introduction to html 5
Nir Elbaz
 
PDF
Multimedia on the web - HTML5 video and audio
Christian Heilmann
 
PDF
Using HTML5 sensibly
Christian Heilmann
 
PDF
JS Days HTML5 Flash and the Battle for Faster Cat Videos
Greg Schechter
 
PDF
Don't make me wait! or Building High-Performance Web Applications
Stoyan Stefanov
 
PDF
HTML5, Flash, and the Battle For Faster Cat Videos
Greg Schechter
 
PPTX
Html5 shubelal
Shub
 
KEY
WHAT IS HTML5?(20100510)
Shumpei Shiraishi
 
PDF
GDD HTML5, Flash, and the Battle for Faster Cat Videos
Greg Schechter
 
PDF
State of Media Accessibility in HTML5
Silvia Pfeiffer
 
PDF
Browser tools that make web development easier
Alan Seiden
 
PPTX
PHP and Platform Independance in the Cloud
ZendCon
 
PDF
BDD - Writing better scenario
Arnauld Loyer
 
PDF
Best Practices in PHP Application Deployment
Shahar Evron
 
PDF
API Technical Writing
Sarah Maddox
 
PDF
Best practices-wordpress-enterprise
Taylor Lovett
 
PPTX
Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...
Geoff Varosky
 
PPTX
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
edm00se
 
PDF
Best Practices for Front-End Django Developers
Christine Cheung
 
KEY
HTML5 Video Presentation
sith33
 
Introduction to html 5
Nir Elbaz
 
Multimedia on the web - HTML5 video and audio
Christian Heilmann
 
Using HTML5 sensibly
Christian Heilmann
 
JS Days HTML5 Flash and the Battle for Faster Cat Videos
Greg Schechter
 
Don't make me wait! or Building High-Performance Web Applications
Stoyan Stefanov
 
HTML5, Flash, and the Battle For Faster Cat Videos
Greg Schechter
 
Html5 shubelal
Shub
 
WHAT IS HTML5?(20100510)
Shumpei Shiraishi
 
GDD HTML5, Flash, and the Battle for Faster Cat Videos
Greg Schechter
 
State of Media Accessibility in HTML5
Silvia Pfeiffer
 
Browser tools that make web development easier
Alan Seiden
 
PHP and Platform Independance in the Cloud
ZendCon
 
BDD - Writing better scenario
Arnauld Loyer
 
Best Practices in PHP Application Deployment
Shahar Evron
 
API Technical Writing
Sarah Maddox
 
Best practices-wordpress-enterprise
Taylor Lovett
 
Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...
Geoff Varosky
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
edm00se
 
Best Practices for Front-End Django Developers
Christine Cheung
 
HTML5 Video Presentation
sith33
 

Viewers also liked (7)

PPT
2010 07 15 - Clinical LOINC Tutorial - Imaging
dvreeman
 
DOC
Bubble
design.sachin
 
PPT
Eeva Liisa
Pirkko Hyvönen
 
PPS
Programa Mais Cultura Audiovisual
FICTV MAIS CULTURA
 
PDF
2009 02 17 - Introduction to EHRs for Rehab Providers
dvreeman
 
PDF
2012 02 16 - Clinical LOINC Tutorial - Collections - Panels Forms and Assessm...
dvreeman
 
PDF
2012 03 20 - LOINC Introduction - AMIA KRS-WG
dvreeman
 
2010 07 15 - Clinical LOINC Tutorial - Imaging
dvreeman
 
Eeva Liisa
Pirkko Hyvönen
 
Programa Mais Cultura Audiovisual
FICTV MAIS CULTURA
 
2009 02 17 - Introduction to EHRs for Rehab Providers
dvreeman
 
2012 02 16 - Clinical LOINC Tutorial - Collections - Panels Forms and Assessm...
dvreeman
 
2012 03 20 - LOINC Introduction - AMIA KRS-WG
dvreeman
 
Ad

Similar to Looking into HTML5 + CSS3 (20)

PPTX
HTML5
Ana AbdElzaher
 
KEY
WHAT IS HTML5? (at CSS Nite Osaka)
Shumpei Shiraishi
 
PPTX
The Rich Standard: Getting Familiar with HTML5
Todd Anglin
 
PPTX
Html 5
Nguyen Quang
 
PDF
Html5 intro
Kevin DeRudder
 
ZIP
Looking into HTML5
Christopher Schmitt
 
ZIP
Html5 public
doodlemoonch
 
KEY
Web Apps
Tim Wray
 
PPTX
Fundamentals of HTML5
St. Petersburg College
 
PDF
HTML5
Cygnet Infotech
 
PPTX
Html5
Nasla C.K
 
PDF
Basics of HTML5 for Phonegap
Rakesh Jha
 
PPTX
HTML 5
Himmat Singh
 
PPTX
Prueba ppt
Ulises Torelli
 
PPTX
Html5v1
Ulises Torelli
 
KEY
Html5 Brown Bag
stuplum
 
PPTX
Introduction to HTML5 and CSS3 (revised)
Joseph Lewis
 
PDF
HTML5, just another presentation :)
François Massart
 
PDF
Html5
shaifymehtadnn
 
WHAT IS HTML5? (at CSS Nite Osaka)
Shumpei Shiraishi
 
The Rich Standard: Getting Familiar with HTML5
Todd Anglin
 
Html 5
Nguyen Quang
 
Html5 intro
Kevin DeRudder
 
Looking into HTML5
Christopher Schmitt
 
Html5 public
doodlemoonch
 
Web Apps
Tim Wray
 
Fundamentals of HTML5
St. Petersburg College
 
Html5
Nasla C.K
 
Basics of HTML5 for Phonegap
Rakesh Jha
 
HTML 5
Himmat Singh
 
Prueba ppt
Ulises Torelli
 
Html5 Brown Bag
stuplum
 
Introduction to HTML5 and CSS3 (revised)
Joseph Lewis
 
HTML5, just another presentation :)
François Massart
 
Ad

More from Christopher Schmitt (20)

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

Recently uploaded (20)

PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PDF
Python Conference Singapore - 19 Jun 2025
ninefyi
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
PDF
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PPTX
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PPTX
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
Why aren't you using FME Flow's CPU Time?
Safe Software
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
Python Conference Singapore - 19 Jun 2025
ninefyi
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Why aren't you using FME Flow's CPU Time?
Safe Software
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 

Looking into HTML5 + CSS3

  • 1. LOOKING INTO HTML5+CSS3 CHRISTOPHER SCHMITT | http://twitter.com/teleject
  • 2. One Look at Flash
  • 3. LOOKING INTO HTML5+CSS3 CHRISTOPHER SCHMITT | http://twitter.com/teleject
  • 4. THINGS ARE GOOD BETWEEN US, XHTML, RIGHT? I MEAN. WE GET ALONG WELL. AND WE BOTH LIKE STUFF.
  • 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.” -TIM BERNERS-LEE
  • 14. “TAKE CARE OF THE LUXURIES AND THE NECESSITIES WILL TAKE CARE OF THEMSELVES.” -FRANK LLOYD WRIGHT
  • 15. NEW HTML5 ELEMENTS • article • figure • progress • aside • footer • rp • audio • header • rt • canvas • hgroup • ruby • command • keygen • section • datalist • mark • source • details • meter • time • dialog • nav • video • embed • output
  • 16. NEW HTML5 ELEMENTS • article • figure • progress • aside • footer • rp • audio • header • rt • canvas • hgroup • ruby • command • keygen • section • datalist • mark • source • details • meter • time • dialog • nav • video • embed • output
  • 18. <!DOCTYPE HTML> <HTML LANG="EN"> <HEAD> <META CHARSET="UTF-8"> <TITLE>BASIC HTML5 WEB DOCUMENT STRUCTURE</TITLE> </HEAD> <BODY> <H1>....</H1> <P>...</P> </BODY> </HTML>
  • 19. <!DOCTYPE HTML> <TITLE>HTML5</TITLE> <P>HELLO WORLD</P> http://validator.w3.org/check?uri=http%3A%2F%2Fjsbin.com %2Fowata&ss=1
  • 21. DIV ID=”header” DIV ID=”nav” DIV ID=”section” DIV ID=”sidecolumn” DIV ID=”article” DIV ID=”footer”
  • 22. HEADER NAV SECTION ASIDE ARTICLE FOOTER
  • 23. <BODY> <HEADER> <H1>HEADING </H1> </HEADER> <NAV> <H3>SITE NAVIGATION</H3> <UL>...</UL> </NAV> <SECTION> <H3>WEBLOG ENTRY</H3> <ARTICLE> </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>
  • 29. HEADER NAV SECTION ASIDE ARTICLE FOOTER
  • 32. LESSONS LEARNED • New HTML5 elements are treated as inline elements. • Need to use CSS property-value display:block • IE6 and IE7 need to be nudged to recognize HTML elements in order to have CSS be applied • document.createElement(‘html5element’); • Dean Edwards IE7 script doesn’t help • There isn’t a jQuery plugin to make it “easier”
  • 33. LESSONS LEARNED • For Firefox 2 and Camino (Gecko 1.9) • HTML5 pages need to be served as XHTML • Content-Type: application/xhtml+xml; • ...Let the irony set for a bit.
  • 34. <?PHP IF ( STRPOS($_SERVER['HTTP_USER_AGENT'], 'FIREFOX/2.0') > -1) { HEADER("CONTENT-TYPE: APPLICATION/XHTML+XML; CHARSET=UTF-8"); ECHO'<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 TRANSITIONAL//EN" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/ XHTML1-TRANSITIONAL.DTD"> <HTML XMLNS="HTTP://WWW.W3.ORG/1999/XHTML" XML:LANG="EN" LANG="EN">'; } ELSE { ECHO '<!DOCTYPE HTML><HTML>'; }?> http://tr.im/h0Rj
  • 36. <!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>
  • 38. HTML5 AUDIO • AUDIO element attributes are SRC, AUTOBUFFER, AUTOPLAY, LOOP, CONTROLS • If you don’t have CONTROL, player becomes transparent • Only able to play OGG format in nightly build of Firefox. • Could not get player to use MP3 audio
  • 39. AUDIO FILE SUPPORT Chrome 3 Firefox 3.5 Safari 4 Opera 10 Beta Ogg Vorbis Y Y MP3 Y Y WAV Y Y Y
  • 40. <!DOCTYPE HTML> <HTML LANG="EN"> <HEAD> <META CHARSET="UTF-8"> <TITLE>BASIC HTML5 WEB DOCUMENT STRUCTURE</TITLE> </HEAD> <BODY> <H1>VIDEO EXAMPLE</H1> <AUDIO CONTROLS AUTOBUFFER> <SOURCE SRC="HTML5AUDIO.OGG" /> <SOURCE SRC="HTML5AUDIO.MP3" /> <!-- INCLUDE ADOBE FLASH PLAYER EMBED AND OBJECT CODE HERE --> </AUDIO> </BODY> </HTML>
  • 42. <!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>
  • 43. <!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>
  • 44. VIDEO DEMOS • Personal demo • http://tinyvid.tv/ • http://www.mozbox.org/jdll/video.xhtml
  • 45. 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. • Alternative text is placed inside VIDEO element. • If you want to give users control, use CONTROL attribute.
  • 46. HTML5 VIDEO • Video can start automatically if using the AUTOPLAY=”1” attribute and value. • Specprovides for LOOP, AUTOBUFFER which also take a value of O or 1. • Codecs support...
  • 47. 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
  • 48. VIDEO CODEC SUPPORT Firefox 3.5 Safari iPhone Android Chrome 3 Theora +Vorbis Y Y +Ogg H.264 +AAC Y Y Y +MP4 http://diveintohtml5.org/video.html
  • 49. LESSONS LEARNED • Works in nightly builds of Firefox (3.2b) and only for OGG format. • Other browsers that said they supported the VIDEO format I could not get to work on my machines. • Used VLC to encode common movie files types to OGG • Toget cross-browser, you will need to encode in more than one file format. Is it really needed? • People really, really, really want this to work.
  • 51. REPLACING ABBR • ABBRis used by screenreaders to expand abbreviations like “lbs” or “NCAAP” • Howeverunintended consequences occurred trying to workaround browser bugs for other HTML elements • What happens when a screenreaders text like this: • “Let’sgo to <abbr class="geo" title="30.300474;-97.747247">Austin, TX</ abbr>” http://www.brucelawson.co.uk/2009/microformats-accessibility-html-5-again/
  • 52. REPLACING ABBR • ABBRis used by screenreaders to expand abbreviations like “lbs” or “NCAAP” • Howeverunintended consequences occurred trying to workaround browser bugs for other HTML elements • What happens when a screenreaders text like this: • “Let’sgo to <abbr class="geo" title="30.300474;-97.747247">Austin, TX</ abbr>” http://www.brucelawson.co.uk/2009/microformats-accessibility-html-5-again/
  • 53. <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">19</ABBR>, AT THE <SPAN CLASS="LOCATION">ARGENT HOTEL, SAN FRANCISCO, CA</SPAN> </DIV>
  • 54. <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-20">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/
  • 56. <CANVAS ID="MYCANVAS" WIDTH="300" HEIGHT="150"> FALLBACK CONTENT, IN CASE THE BROWSER DOES NOT SUPPORT CANVAS. </CANVAS>
  • 57. <SCRIPT TYPE="TEXT/JAVASCRIPT"><!-- WINDOW.ADDEVENTLISTENER('LOAD', FUNCTION () { // GET THE CANVAS ELEMENT. VAR ELEM = DOCUMENT.GETELEMENTBYID('MYCANVAS'); IF (!ELEM || !ELEM.GETCONTEXT) { RETURN; } // GET THE CANVAS 2D CONTEXT. VAR CONTEXT = ELEM.GETCONTEXT('2D'); IF (!CONTEXT) { RETURN; } // NOW YOU ARE DONE! LET'S DRAW A BLUE RECTANGLE. CONTEXT.FILLSTYLE = '#00F'; CONTEXT.FILLRECT(0, 0, 150, 100); }, FALSE); // --></SCRIPT>
  • 59. // GET THE CANVAS ELEMENT. VAR ELEM = DOCUMENT.GETELEMENTBYID('MYCANVAS'); IF (!ELEM || !ELEM.GETCONTEXT) { RETURN; } // GET THE CANVAS 2D CONTEXT. VAR CONTEXT = ELEM.GETCONTEXT('2D'); IF (!CONTEXT) { RETURN; } CONTEXT.FILLSTYLE = '#00F'; CONTEXT.STROKESTYLE = '#F00'; CONTEXT.LINEWIDTH = 4; // DRAW A RIGHT TRIANGLE. CONTEXT.BEGINPATH(); CONTEXT.MOVETO(10, 10); CONTEXT.LINETO(100, 10); CONTEXT.LINETO(10, 100); CONTEXT.LINETO(10, 10); CONTEXT.FILL(); CONTEXT.STROKE(); CONTEXT.CLOSEPATH(); }, FALSE);
  • 61. // GET THE CANVAS ELEMENT. VAR ELEM = DOCUMENT.GETELEMENTBYID('MYCANVAS'); IF (!ELEM || !ELEM.GETCONTEXT) { RETURN; } // GET THE CANVAS 2D CONTEXT. VAR CONTEXT = ELEM.GETCONTEXT('2D'); IF (!CONTEXT) { RETURN; } CONTEXT.FILLSTYLE = '#00F'; CONTEXT.STROKESTYLE = '#F00'; CONTEXT.LINEWIDTH = 4; // DRAW A RIGHT TRIANGLE. CONTEXT.BEGINPATH(); CONTEXT.MOVETO(10, 10); CONTEXT.LINETO(100, 10); CONTEXT.LINETO(10, 100); CONTEXT.LINETO(10, 10); CONTEXT.FILL(); CONTEXT.STROKE(); CONTEXT.CLOSEPATH(); }, FALSE);
  • 63. HTML5 AND LOCAL DATABASE, APP CACHE, GEOLOCATION, YOUR PHONE
  • 65. DATABASE, APP CACHE, GEOLOCATION LINKS • W3C HTML5 Database Storage Specification: http://tr.im/h13y • W3C Geolocation API Specification: http://tr.im/h12L • W3C HTML5 Offline Web Applications: http://tr.im/h12z • Safari Dev Connection on HTML5 Offline Application Cache: http://tr.im/h12f • WebKit Does HTML5 Client-Side Storage: http://tr.im/h140
  • 66. “HTML 5 IS A KLUDGE.” - BRUCE LAWSON
  • 68. LOOKING GOOD CSS3
  • 69. “NEW” “CSS3” PROPERTIES • @font-face • stretching images • text-shadow • rotating images • background color opacity (RGBA) • setting gradients • text columns • alpha transparent IMG • rounded corners • box shadow • multiple images on one HTML • CSS masks element • opacity on elements • setting images on borders • CSS animation
  • 73. #COLUMN { -MOZ-COLUMN-GAP: 3EM; -MOZ-COLUMN-WIDTH: 11EM; -WEBKIT-COLUMN-GAP: 3EM; -WEBKIT-COLUMN-WIDTH: 11EM; PADDING: 10PX; }
  • 74. #COLUMN { -MOZ-COLUMN-GAP: 3EM; -MOZ-COLUMN-WIDTH: 11EM; -MOZ-COLUMN-RULE: 1PX SOLID #CCC; -WEBKIT-COLUMN-GAP: 3EM; -WEBKIT-COLUMN-WIDTH: 11EM; -WEBKIT-COLUMN-RULE: 1PX SOLID #CCC; PADDING: 10PX; }
  • 75. LESSONS LEARNED • Proprietary CSS extensions in Firefox and Safari. • JavaScriptsolution through a jQuery plugin: http://welcome.totheinter.net/2008/07/22/multi-column-layout- with-css-and-jquery/
  • 78. #NUMBER4 { OPACITY: .4; /* .4 = 40% TRANSPARENCY */ FILTER: ALPHA(OPACITY=40); /* 40 = 40% TRANSPARENCY */ }
  • 79. LESSONS LEARNED • Supported in Firefox 1.5+, Opera 9+, Safari 1.2+ and Chrome. • IE5.5+ requires the use of its own alpha filter in order for the effect to be cross-browser. •A drawback to using the opacity filter is that the value is inherited: • If a parent element is set to be 10% transparent, the child elements’ transparency is also going to be 10%. • Watch out for legibility issues within the Web page.
  • 82. #NUMBER4 { BACKGROUND-COLOR: RGBA(255, 255, 0, .4); }
  • 83. #NUMBER4 { BACKGROUND-COLOR: RGB(255, 255, 0); BACKGROUND-COLOR: RGBA(255, 255, 0, .4); }
  • 84. LESSONS LEARNED • Firefox 3+, Opera 10+, and Safari support RGBA • Requires another background-color property for cross-browser support. • IE Support!
  • 85. #NUMBER4 { BACKGROUND-COLOR: TRANSPARENT; FILTER:PROGID:DXIMAGETRANSFORM.MICROSOFT.GRADIENT(STARTCO LORSTR=#66FFFF00,ENDCOLORSTR=#66FFFF00); }
  • 86. LESSONS LEARNED • First step is to convert the RGB value of the color to hexadecimal. In this example, rgb(255,255,0) converts to #FFFF00. • Next, convert the alpha transparency value to hexadecimal string . In this example, the value is 66. • E.g., alpha value of .3 equals 4D in hexadecimal values • Then assemble the hexadecimal value for transparency and the color together in one string, starting with the transparency: #66FFFF00.
  • 89. #HEADER .BORDER { BORDER: 1PX SOLID #930; -WEBKIT-BORDER-IMAGE: URL(ZOD-BOX.PNG) 1 1 1 1 STRETCH STRETCH; -MOZ-BORDER-IMAGE: URL(ZOD-BOX.PNG) 1 1 1 1 STRETCH STRETCH; PADDING: 7PX; } #HEADER .WRAP { COLOR: #FFF; COLOR: RGBA(255,255,255,.9); MIN-WIDTH: 250PX; TEXT-SHADOW: 0 -1PX 0 RGBA(0,0,0,.8); BOX-SHADOW: 3PX 3PX 19PX RGBA(0,0,0,.3); -WEBKIT-BOX-SHADOW: 3PX 3PX 19PX RGBA(0,0,0,.3); -MOZ-BOX-SHADOW: 3PX 3PX 19PX RGBA(0,0,0,.3); BACKGROUND: #930; BACKGROUND: -WEBKIT-GRADIENT(LINEAR, LEFT TOP, LEFT BOTTOM, FROM(RGBA(153,51,0,.3)), TO(#6B3703), COLOR-STOP(0.5, #903000)); BACKGROUND: -MOZ-LINEAR-GRADIENT(LEFT TOP, LEFT BOTTOM, FROM(RGBA(153,51,0,.3)), TO(#6B3703), COLOR-STOP(0.5, #903000)); PADDING: 14PX; }
  • 91. @-WEBKIT-KEYFRAMES "CLOUDS" { FROM { RIGHT: 0PX; } TO { RIGHT: 100PX; } } #CLOUDS1 { WIDTH: 627PX; HEIGHT: 410PX; POSITION: ABSOLUTE; RIGHT: -300PX; TOP: 0; BACKGROUND-IMAGE: URL(CLOUDS.PNG); -WEBKIT-TRANSFORM: TRANSLATE(300PX, 0PX); -WEBKIT-ANIMATION-NAME: "CLOUDS"; -WEBKIT-ANIMATION-DURATION: 10S; -WEBKIT-ANIMATION-ITERATION-COUNT: 10; -WEBKIT-ANIMATION-DIRECTION: ALTERNATE; }
  • 93. HTML5+CSS3 RESOURCES • HTML5 Doctor http://html5doctor.com • “When Can I Use…” http://a.deveria.com/caniuse/ • Comparison of Layout Engines (HTML5) http://en.wikipedia.org/wiki/ Comparison_of_layout_engine s_(HTML_5)
  • 94. THANK YOU! Christopher Schmitt schmitt@heatvision.com http://twitter.com/teleject
  • 95. Creative Commons Citations http://www.flickr.com/photos/gurock20/459901107/ http://www.flickr.com/photos/wili/214317898/ http://www.flickr.com/photos/gadl/421838292/ http://www.flickr.com/photos/tantek/1141384818/ http://www.flickr.com/photos/bdougherty/3172618046/ http://dev.opera.com/articles/view/html-5-canvas-the-basics/

Editor's Notes

  • #2: Are you kidding me?
  • #3: This is going to prove to you I don&apos;t know anything about Flash and how important I think it is.
  • #4: Are you kidding me?
  • #5: What is XHTML is a recasting of HTML 4 as XML? But is XML helping us out?
  • #7: As I saw it, the goal of XHTML was XML and that there wouldn&amp;#x2019;t need to be a need for an upgrade to HTML4. However, there comes a point when what&amp;#x2019;s planned doesn&amp;#x2019;t turned out to be true. Like the architect&amp;#x2019;s blueprint--it can never foresee the needs of the occupants 40-50 years from now. Therefore the owners adapt the house to suit their needs.
  • #8: Even with Flash and Silverlight, HTML and XHTML has its limitations. We need new elements to mark up content in a true semantic manner.
  • #9: Microformats tries to solve or overcome some of these limitations, but co-opting HTML elements and attributes is a strategy that can only be squeezed to far even with the best of intentions.
  • #10: BBC removed the hCalendar from it&amp;#x2019;s site due to for-machine only code reading out and keeping other industries that need ABBR tag like travel.
  • #11: We have Web sites that offer software like applications, we have Web sites that sport audio and video like it&amp;#x2019;s candy machine. Like chocolate rain.
  • #12: It&amp;#x2019;s Pretty easy to get bored with international, ALMOST- instant communication. (ONE CAN ONLY READ SO MUCH WIKIPEDIA.)
  • #14: As Frank Lloyd Wright once said... you take care of the stuff that will make your life easier, everything else will work itself out. What does this mean? It means we have basic Web formatting of text down and we&amp;#x2019;ve bought into this theory that this ex
  • #15: So what new things will we get out of HTML5?
  • #16: So what new things will we get out of HTML5?
  • #18: Pretty simple DOCTYPE; I have to copy and paste XHTML Doctypes cause I don&amp;#x2019;t remember them. And a character set, pretty common.
  • #19: Pretty simple DOCTYPE; I have to copy and paste XHTML Doctypes cause I don&amp;#x2019;t remember them. And a character set, pretty common.
  • #20: The W3C validator has a beta!
  • #21: A common setup for a page layout. Use of DIVs and pretty typical values for ID attributes.
  • #22: With HTML5, there&amp;#x2019;s an acceptance of these types of Web document structures. HTML5 has elements for HEADER, for ARTICLE, for SECTIOn, for ASIDE, for FOOTER.
  • #24: Using Opera as our testing browser, we can see a basic layout with CSS added for color works when applied to our new HTML5 elements.
  • #25: However, in IE6 (and IE7, not pictured) the browser doesn&amp;#x2019;t recognize these values. With IE taking up a huge market share of the browser market, it&amp;#x2019;s important that we at least an attempt to style the page.
  • #27: WIth these events, the browser recognizes the elements and the CSS properties can be applied. Tried the Dean Edwards IE7 script and it doesn&amp;#x2019;t work.
  • #29: With HTML5, there&amp;#x2019;s an acceptance of these types of Web document structures. HTML5 has elements for HEADER, for ARTICLE, for SECTIOn, for ASIDE, for FOOTER.
  • #32: these are the two main lessons I learned; granted I didn&amp;#x2019;t push the envelope by any stretch of the imagination. I feel based on my initial working there could be some problem with CSS inheritance, but you might be able to force that through
  • #33: these are the two main lessons I learned; granted I didn&amp;#x2019;t push the envelope by any stretch of the imagination. I feel based on my initial working there could be some problem with CSS inheritance, but you might be able to force that through
  • #34: these are the two main lessons I learned; granted I didn&amp;#x2019;t push the envelope by any stretch of the imagination. I feel based on my initial working there could be some problem with CSS inheritance, but you might be able to force that through
  • #36: Very straightforward method for including video. Notice width and height attribute, poster attribute, and alternative text. PULL UP VIDEO DEMO!!
  • #37: Show demo in mindield
  • #38: Also, the code is pretty much the HTML5 video element without height and width attributes
  • #40: Cross browser version.
  • #42: Basic Flash HTML to include a flash movie; straight from YouTube
  • #43: Very straightforward method for including video. Notice width and height attribute, poster attribute, and alternative text. PULL UP VIDEO DEMO!!
  • #47: Originally spec said for browsers venders to use the Ogg Theora video and Orr Vorbis audio and the Ogg Container format, but vendors like Apple rejected on the grounds of submarine patents. FYI, This text is all in red when you get to the page.
  • #49: I felt that the video support is a lot like SVG. There is a lot more potential for support for video since everyone can see the value of HTML5 videos--but it needs to make a case for a clean break from the infrastructure that companies have in Flash.
  • #50: I want to touch base with the microformats issue and the BBC. If you recall, it centered on the ABBR element being a bit overused.
  • #51: Click forward to hear audio
  • #52: HTML4 based hCalendar microformat from spec
  • #53: Replace with TIME element and use the DATETIME attribute
  • #54: Canvas is a new element in HTML5 allowing for an easier, powerful way to draw graphics using JavaScript. Is it like SVG?
  • #56: You want to check to make sure the browser supports HTML5 canvas. Then set the context--this is set for 2d, but browsers can make their own. Like Opera is testing out 3d. Then you can use
  • #61: canvas is supported in Opera, Firefox, and Safari--esp. in the iPhone. This is done by Dunstan Orchard. A Web-app he&amp;#x2019;s building for the iphone for tracking his workout routine.
  • #64: http://webkit.org/misc/DatabaseExample.html
  • #65: It&amp;#x2019;s still a work in progress-- and it&amp;#x2019;s a piece of work. It has to bend backwards to support HTML4 as well as lean forward to support the future of the Web as it sees fit. Which if XHTML tells you anything, it&amp;#x2019;s a guess game. So, XHTML is still, I believe, the way to go.
  • #67: Now is the time to stop talking about structure of documents, the fiber of the web, and start talking about looking good.
  • #68: So what new things will we get out of HTML5?
  • #69: I want to touch base with the microformats issue and the BBC. If you recall, it centered on the ABBR element being a bit overused.
  • #74: I felt that the video support is a lot like SVG. There is a lot more potential for support for video since everyone can see the value of HTML5 videos--but it needs to make a case for a clean break from the infrastructure that companies have in Flash.
  • #75: I want to touch base with the microformats issue and the BBC. If you recall, it centered on the ABBR element being a bit overused.
  • #78: I felt that the video support is a lot like SVG. There is a lot more potential for support for video since everyone can see the value of HTML5 videos--but it needs to make a case for a clean break from the infrastructure that companies have in Flash.
  • #79: I want to touch base with the microformats issue and the BBC. If you recall, it centered on the ABBR element being a bit overused.
  • #83: I felt that the video support is a lot like SVG. There is a lot more potential for support for video since everyone can see the value of HTML5 videos--but it needs to make a case for a clean break from the infrastructure that companies have in Flash.
  • #85: I felt that the video support is a lot like SVG. There is a lot more potential for support for video since everyone can see the value of HTML5 videos--but it needs to make a case for a clean break from the infrastructure that companies have in Flash.
  • #86: I want to touch base with the microformats issue and the BBC. If you recall, it centered on the ABBR element being a bit overused.
  • #89: I want to touch base with the microformats issue and the BBC. If you recall, it centered on the ABBR element being a bit overused.