HTML 5 – Let’s Make Progress [eduWeb 2011]Presentation Transcript
Let’s Make Progress Shahab Lashkari Product Manager OmniUpdate, Inc. firstname.lastname@example.org @OUShahab
Overview What it is What it isn’t Semantics Forms Video Canvas vs. SVG vs. CSS3 Compatibility Questions?
What is HTML 5? The latest revision of the HTML standard Contains both HTML 4 and XHTML 1 Though some elements have been deprecated Can be written in either syntax New APIs (e.g., canvas, offline storage, media playback, drag-and-drop, etc.) New rules for error handling (!)
What HTML 5 is not… An official W3C recommendation yet A silver bullet Fully supported in [m]any browsers
So what’s different?
So what’s different?
New semantic elements article aside audio canvas figcaption figure footer header nav section video etc.
New semantic elements <header> <nav> <article> <aside> <section> <footer>
New form input types email url tel number range search date month week time color etc. e.g., <input type="email">
Forms New input types can make life easier on mobile devices!
New form input attributes autofocus* placeholder required* pattern speech?* etc. *booleanattributes
Canvas vs. SVG vs. CSS3 Canvas is essentially a sketchpad Scalable Vector Graphics use math to create images CSS3 can do some prettyamazingthings
Compatibility Should I be sniffing for user agent? Then how will I know which features are supported? What if I want to use a feature that isn’t supported in all browsers?
Should I be sniffing for user agent? NO
Which features are supported? Mark Pilgrim suggests using one of 4 techniques: Check if a certain property exists on a global object (such as window or navigator). Example: testing for geolocationsupport Create an element, then check if a certain property exists on that element. Example: testing for canvas support Create an element, check if a certain method exists on that element, then call the method and check the value it returns. Example: testing which video formats are supported Create an element, set a property to a certain value, then check if the property has retained its value. Example: testing which <input> types are supported
Useful Resources Modernizr http://www.modernizr.com/ When can I use… http://www.caniuse.com/ HTML5 Boilerplate http://html5boilerplate.com/
What if I want to use an unsupported feature? do websites need to look exactly the same in every browser?
What if I want to use an unsupported feature? dowebsitesneedtolookexactlythesameineverybrowser.com
References Dive into HTML5 - http://diveintohtml5.org A List Apart - http://www.alistapart.com/articles/previewofhtml5 W3C - http://www.w3.org/html5 Wikipedia - http://en.wikipedia.org/wiki/HTML5_video HTML5 Rocks - http://www.html5rocks.com
Examples in higher education University of Denver The University of North Dakota
Thank you! Shahab Lashkari Product Manager OmniUpdate, Inc. email@example.com @OUShahab