2. Session Objectives and Takeaways
Brief tour of HTML5
Leveraging HTML5 Features in SharePoint 2010
Adding Support for IE8 and IE7
References….
4. Brief History of HTML and CSS
• HTML 3.2 and CSS 1.0 (1997)
– Browser wars between Netscape vs. Internet Explorer
• HTML 4.01 and CSS 2.0 (1999)
– Exit Netscape – Enter FireFox, Opera, Safari, etc.
• XHTML 1.0 and CSS 2.1 (2000)
– HTML content pages written as valid XML documents SharePoint 2010 lives here
• HTML 5 and CSS 3.0 (2005)
– Rejects the constraints added by XHTML
– Standardizes new HTML elements, CSS properties and JavaScript APIs
5. Five things you need to know about HTML5!
1. Its not once big thing.
2. You don’t need to throw anything away.
3. Its easy to get started.
4. It already works.
5. Its here to stay.
8. HTML is New HTML5
This is the HTML5 doctype:
<!DOCTYPE html>
That’s it. Just 15 characters. It’s so easy, you can type it by hand..
9. Moving to HTML5
• Primary Motivations
– To write HTML that works consistently across all modern browsers
– To take advantage of the of the new JavaScript APIs
– To eliminate need for Flash and other browser-specific plug-ins
– To target mobile devices and the CEO's iPad
• Primary Pain Points
– Today's "modern" browsers only support portions of HTML5 specification
– Full HTML5 specification support across modern browsers anticipated in 2022
– Internet Explorer (IE) does not offer HTML5 tag support until IE9
– IE8 and IE7 are difficult to support in HTML5 Websites
19. HTML5 Master Page
• Let's See a custom master page for SharePoint 2010 that…
– uses the HTML5 doctype
– provides foundation for pages to take advantage of HTML5 features
– Demo………
20. Creating Pages using new HTML5 Features
• Examples of using HTML5 Functionality in SharePoint 2010
– Using Scalable Vector Graphics (SVG)
– Using the Canvas
– Using the Video element
– Using Geolocation
– Demo………
22. What About IE8 and IE7?
• IE8 and IE7 Still Make Up Significant Percentage of Browser Base
– Graphic on this slide show stats across Internet Users
– SharePoint environment are even more reliant on IE8 and IE7
– Neither IE8 nor IE7 support most changes to HTML5
– Leveraging HTML5 while supporting IE8 and IE7 requires
considerable effort
23. Adding Support for IE7 and IE8
• Support older browsers requires adding "polyfills"
– A polyfill is a shim which provides fallback functionality to older browsers
– Allows you to code to spec for HTML5, CSS3 and new JavaScript API
– Polyfills fill the gaps for older browsers to add support or degrade gracefully
– As users upgrade, your code doesn't change but user experience improves
• Supporting Older Browsers Begins with Modernizr
– Open source project that tests current browser for over 40 HTML5 features
– It adds classes to HTML elements that signify which features are supported
– It creates JavaScript object named Modernizr with Boolean properties
– It provides script loader with polyfills to backfill functionality in old browsers
27. References
• HTML5 cheat sheet
• http://diveintohtml5.org/peeks-pokes-and-pointers.html
• Get help selecting the right framwork with http://microjs.com/
• Another template: http://html5reset.org
• Canvas Cheat Sheet:
• http://html5samples.com/wp-content/uploads/2010/03/HTML5_Canvas_Cheat_Sheet.png
• Massive collection of tutorials:
• “The Ultimate HTML5 Tutorials and Useful Techniques”
• http://www.dzinepress.com/2011/04/the-ultimate-html5-tutorials-and-useful-techniques/
• An oldie: http://www.html5rocks.com/