Modernize Your Old Browser to Support HTML 5 Svetlin Nakov Telerik Software Academy academy.telerik.com Senior Technical Trainer www.Nakov.com.

Slides:



Advertisements
Similar presentations
PART IV - EMBED VIDEO, AUDIO, AND DOCUMENTS. Find a video on Youtube.com: Search for a video, then look for the Embed code. Copy this code into the HTML/JavaScript.
Advertisements

Build Amazing Apps with Web Standards Mobile HTML5 Applications In Hours, Not Days.
HTML5 Overview Owen Williams owen at dynabooks daht com Owen Williams owen at dynabooks daht com.
Using EBSCOs Search Box Builder Tool Tutorial. Would you like to promote your EBSCOhost resources by adding an easy-to-use search box to your website?
Creating an EDS Search Box Using EBSCO’s Search Box Builder Tool
Slice and Dice: From PSD Image to XHTML+CSS Svetlin Nakov Telerik Corporation
Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
What is jQuery Mobile? How to use it? Doncho Minkov Telerik Corporation Technical Trainer.
Developing downloadable mobile apps using HTML5 and PhoneGap Apache Callback Ron Perry, CTO, Worklight Inc.
NIAGARA MOBILE Gareth Johnson June, 2012 © Tridium 2012.
DataNaut, LLC 1 Building Cross-Platform Accessible Applications Using Qt Technical Overview September 2012.
Novinky v Václav Dajbych Microsoft Student Partner
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 22, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
What is HTML5…?. ”…removes the need for plugins” ”…can handle multimedia directly” ”…enables rich, interactive clients” ”…enables advanced visual designs”
Bring Life to Your Web Pages with JavaScript and HTML5 Ole Ildsgaard Hougaard -
CHAPTER 15 WEBPAGE OPTIMIZATION. LEARNING OBJECTIVES How to test your web-page performance How browser and server interactions impact performance What.
New Tags, New Attributes, New JavaScript APIs, Forms, Validation, Audio, Video, SVG, Canvas Doncho Minkov Telerik Corporation
2 History of World-Wide Web and HTML  1989: WWW has been invented at CERN  1991: Official birthday of HTML.
HTML5 That’s What You Need to Know Today Ingo Rammer | thinktecture |
Responsive and Adaptive Web Design By: Chad W. Stoker (MCTS, MCP, MCAD) President & Chief Technology Officer.
JQuery A Javascript Library Hard things made eas(ier) Norman White.
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
SHAREPOINT PAKISTAN USER GROUP #1 SHAREPOINT COMMUNITY IN PAKISTAN AND ASIA HTML5 and SharePoint 2013.
HTML 5 and CSS 3, Illustrated Complete Unit K: Incorporating Video and Audio.
Using HTML5 & CSS3 Today. Where we're at Comfortable with HTML4 or XHTML and CSS2 Hearing talk of HTML5 and CSS3 Rapidly advancing browsers...but we've.
HTML5 That’s what you need to know today Ingo Rammer, thinktecture
HTML Advanced: HTML 5. Welcome This slideshow presentation is designed to introduce you to HTML 5. It is the third of three HTML workshops available at.
CM143 - Web Week 2 Basic HTML. Links and Image Tags.
4.01 Cascading Style Sheets
Bones – HTML5 Wordpress Theme Development
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
HTML 5 and Content Strategy for the Web By: Christina Fregosi ISC 496.
CHASING THE EVOLVING WEB Aaron Readify Senior Developer, Technical Specialist (Web) Microsoft MVP – Internet Explorer (Development) SESSION.
Additional Topics. Tutorial #9 Review – Forms Forms Legend and fieldset Fields Text Password Radio buttons, check box, text area, select lists Buttons.
Intro to Dreamweaver Web Design Section 7-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course.
New Tags, New Attributes, New JavaScript APIs, Forms, Validation, Audio, Video, SVG, Canvas Doncho Minkov Telerik Corporation Technical.
HTML Advanced: HTML 5. Introduction to HTML 5 These slides are based on source material found at the w3schools.com website.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Congratulations! You are part of a global community of thousands of web developers who attend Web Camps to keep their web development skills up-to-date.
Introduction to HTML. What is HTML?  Hyper Text Markup Language  Not a programming language but a markup language  Used for presentation and layout.
audio video object Options: controls autoplay Need to define height and width Options: controls autoplay.
Controllers and Markup Controllers, $scope, Markup, Directives, Expressions, Binding, Filters, Validation SoftUni Team Technical Trainers Software University.
AMD and RequireJS Splitting JavaScript Code into Dependent Modules Software University Technical Trainers SoftUni Team.
SASS & LESS Syntactically Awesome StyleSheets Dynamic StyleSheet Language Svetlin Nakov Technical Trainer Software University
HTML – Other Tags Semantic Tags, Frames, Embed Multimedia Content, Others SoftUni Team Technical Trainers Software University
Jekyll Static Site Generator Template-Based Site Generation Svetlin Nakov Technical Trainer Software University
HTML Forms Forms, Controls, Fields, Inputs, Submission, Validation SoftUni Team Technical Trainers Software University
Forms Overview, Query string, Submitting arrays, PHP & HTML, Input types, Redirecting the user Mario Peshev Technical Trainer Software.
INTRODUCTION TO HTML5 New HTML5 User Interface and Attributes.
Let’s look what flash can do: OK, that wasn’t flash! That was HTML5.
S'n'D Course Program, Evaluation, Exams, Resources Doncho Minkov Telerik Software Academy academy.telerik.com Technical Trainer
TNPW1 Ing. Jiří Štěpánek.  In current version (XHTML 1.0 strict)  No multimedia elements  No semantics elements  Only few input types  Only few document.
HTML 5 (Part 1) – Start from SCRATCH. HTML 5 – Start from SCRATCH.
CSS Cascading Style Sheets Prepared By
COM621: Advanced Interactive Web Development Lecture 6 – JavaScript (cont.)
The HTML5 logo was introduced by W3C in 2010
Chapter 4: Feature Detection & Drag and Drop
Creating Visual Effects
Accessing the device native APIs
Using ASP.NET Master Pages
ASP.NET Core Tag Helpers
Extending functionality using Collections
Creating Visual Effects and Animation
Building a Custom Video Player
CSS Transitions and Animations
Application with Cross-Platform GUI
Lean .NET stack for building modern web apps
CSS Transitions and Animations
Chasing the evolving web
Creating dynamic/interactive web pages
Presentation transcript:

Modernize Your Old Browser to Support HTML 5 Svetlin Nakov Telerik Software Academy academy.telerik.com Senior Technical Trainer

2  What is Modernizr.js?  Using Modernizr.js  Installing Modernizr  Detecting HTML5 Features  Fallbacks for Missing CSS3 Features  Loading Polyfills for Missing Features

JS Library to Detect Native HTML 5 Features

 Modernizr is a JavaScript library that detects HTML 5 and CSS 3 features in the browser   Modernizr has three primary tasks  Adds html5shiv if needed (HTML5 tags in old IE) html5shiv  Detects html 5 support through adding classes to the HTML element  Class js for "js is supported" and "no-js" otherwise  Yep / nope loading of polyfills  If a features is not supported  load a polyfill

 Steps to install Modernizer: 1.Go to Select features you want to use 3.Generate and download your customized Modernizr JS code

 Modernizer can check for HTML5 / CSS3 features through JavaScript:  Features detected by Modernizr:  if (Modernizr.canvas) { alert('HTML5 canvas is supported'); alert('HTML5 canvas is supported'); } else { alert('HTML5 canvas is NOT supported'); alert('HTML5 canvas is NOT supported');}

Live Demo

 On document load Modernizr detects which features are supported  Adds classes " feature " / " no-feature " for the features to the HTML element  Example features:  canvas, rgba, sessionstorage, etc.  If the features are supported  no-canvas, no-rgba, no-sessionstorage, etc.  If the features are not supported

 If CSS gradients are not supported, use a fallback gradient with PNG repeated by X: <style>.box {.box { width: 150px; width: 150px; height: 150px; height: 150px; border: 1px solid black; border: 1px solid black; }.cssgradients.box {.cssgradients.box { // css gradients code // css gradients code }.no-cssgradients.box {.no-cssgradients.box { background: url(gradient.png) 0 0 repeat-x; background: url(gradient.png) 0 0 repeat-x; }</style>

Live Demo

Yep / Nope Loading of JS Polyfills for Missing HTML5 Features

 Modernizr can test for features and load resources depending on their support  Used to load polyfills for unsupported features <script> Modernizr.load({ Modernizr.load({ test: Modernizr.audio, test: Modernizr.audio, nope: ' html5media.min.js' nope: ' html5media.min.js' }); });</script>

Live Demo

 HTML 5 Telerik Academy  html5course.telerik.com html5course.telerik.com  Telerik Software Academy  academy.telerik.com academy.telerik.com  Telerik Facebook  facebook.com/TelerikAcademy facebook.com/TelerikAcademy  Telerik Software Academy Forums  forums.academy.telerik.com forums.academy.telerik.com

1. Create a HTML page to display the current Web browser and the supported and not supported HTML 5 and CSS 3 features. Use ua-parser-js to detect the browser type, version, OS and device. Use Modernizr.js to detect the features (see an example here: ua-parser-jshttp://fiddle.jshell.net/ncuesta/NHTyT/show/ua-parser-jshttp://fiddle.jshell.net/ncuesta/NHTyT/show/ 2. Create a simple HTML 5 application by choice that uses Canvas, GeoLocation and LocalStorage APIs. Using Modernizr.load() provide fallbacks for older browsers. Use polyfills by choice (e.g. 5-Cross-Browser-Polyfills). Test in old browsers. 5-Cross-Browser-Polyfills 5-Cross-Browser-Polyfills 18

3. Using HTML5 and CSS3 create a page to display a date field with a date picker. Use Modernizr to load the jQueryUI date picker only if the browser does not provide a native date picker. 19