background preloader

5 More HTML5 APIs You Didn’t Know Existed

5 More HTML5 APIs You Didn’t Know Existed
The HTML5 revolution has provided us some awesome JavaScript and HTML APIs. Some are APIs we knew we've needed for years, others are cutting edge mobile and desktop helpers. Regardless of API strength or purpose, anything to help us better do our job is a step in the right direction. Fullscreen API The awesome Fullscreen API allows developers to programmatically launch the browser into fullscreen mode, pending user approval: function launchFullScreen(element) { if(element.requestFullScreen) { element.requestFullScreen(); } else if(element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if(element.webkitRequestFullScreen) { element.webkitRequestFullScreen(); }}launchFullScreen(document.documentElement);launchFullScreen(document.getElementById("videoElement")); Any element can be pushed to fullscreen, and there's even a CSS pseudo-class to allow some control over the screen while in fullscreen mode. Page Visibility API getUserMedia API Battery API Link Prefetching

Cours d'Algorithmique - Christophe Darmangeat PARTIE 9 Corrigés des Exercices Exercice 9.1 A ← Sin(B) Aucun problème A ← Sin(A + B * C) Aucun problème B ← Sin(A) – Sin(D) Erreur ! D est en caractère C ← Sin(A / B) Aucun problème… si B est différent de zéro C ← Cos(Sin(A) Erreur ! Vous étiez prévenus, c'est bête comme chou ! Variable Mot en Caractère Variable Nb en Entier Debut Ecrire "Entrez un mot : " Lire Mot Nb ← Len(Mot) Ecrire "Ce mot compte ", Nb, " lettres" Fin Là, on est obligé de compter par une boucle le nombre d'espaces de la phrase, et on en déduit le nombre de mots. Variable Bla en Caractère Variables Nb, i en Entier Debut Ecrire "Entrez une phrase : " Lire Bla Nb ← 0 Pour i ← 1 à Len(Bla) Si Mid(Bla, i , 1) = " " Alors Nb ← Nb + 1 FinSi i suivant Ecrire "Cette phrase compte ", Nb + 1, " mots" Fin Solution 1 : pour chaque caractère du mot, on pose une très douloureuse condition composée. Solution 2 : on stocke toutes les voyelles dans une chaîne. - soit transformer les caractères en leurs codes ASCII.

20 Tools Web Designers Should Be Thankful For This Thanksgiving I always get sentimental this time of year. For me, the next few weeks will be a dizzying blur of aromatic turkey, neatly wrapped gifts, and family. In an effort to keep myself from becoming too wrapped up in the holiday shenanigans of black Friday sales and rushing to buy the last can of cranberry sauce, I have compiled a list of 20 web design tools that I am thankful for this year. 1-Firebug Number one on my list this year, and probably for years to come is Firebug. 2- Lipsum Lipsum.com generates the standard Lorem Ipsum dummy text. *Special Treat: If plain old Lorem Ipsum just won’t do, try Bacon Ipsum. 3- Buffer This tool was first introduced to me by one of our very own SEO Specialists, Lucia Sastre. 4- Twitter Okay, this tool may not be web-design-specific, but it is most certainly Bridget-specific. 5- Colorzilla for Firefox 6- SEOQuake The final Firefox add-on that makes this list is SEOQuake. 7- DaFont 8- Google Analytics 9- Mail Chimp 10- Matt Kersley’s Responsive Design Tool

Easy Form Validation using HTML5 Writing validation logic using JavaScript in an HTML form is not an easy thing to do. We all have seen it in HTML4 but what’s new in HTML5? Will it provide us with an easy way to validate a form by writing just a small piece of code? Today we will be talking about this validation stuff in HTML5. But as usual, all the browsers don’t support all of them but it is a good start to think for future. Reference: Easy Form Validation using HTML5[^] Introduction In HTML4, we had a single input type for entering text but in HTML5 we have different input types for entering different data types, e.g., we have email data type for email address, url data type for entering a website URL, number for numeric inputs, and text data type for strings. Not only this, HTML5 also supports placing a watermark text as a place holder text of any textbox. As usual, HTML still has an issue in terms of browser support. Here is a comparison chart of HTML5 Validation support in different web browsers: Playing with code

The developer’s guide to the HTML5 APIs net magazine is the number one choice for the professional web designer and developer. It’s here that you find out about the latest new web trends, technologies and techniques – all in one handy package. Each issue boasts a wealth of expert tips and advice, including in-depth features and over 30 pages of advanced front- and backend tutorials on subjects as diverse as CSS, HTML, JavaScript, WordPress, PHP, and plenty more. net compiles the hottest new sites from around the web, and being the voice of web design, our mission is to source the best articles written by the best people in the industry and feature interviews and opinions crammed with inspiration and creative advice. In short, If you're serious about web design and development, then net is the magazine for you. Editorial Advertising

WebPlatform.org — Your Web, documented Parallax Scrolling Scripts and Plugins Parallax scrolling sites have been a pretty hot UX thing of late, being showcased on various blogs. Although the “ooooh! aahhh!” To help you choose a JavaScript or jQuery library or plugin for doing this sort of thing (unless you’re a masochist and want to write one from scratch!) Parallax-JS (by Razorfish) Described as “Parallax page generator from simple HTML & CSS”. View demo Parallaxjs (by stolksdorf) This one seemed to be one of the more popular ones, but the demo page has recently gone haywire. View demo (like I said, broken, but maybe it will be back soon) | GitHub repo Scrollorama (by John Polacek) A jQuery plugin “for doing cool scrolly stuff”. GitHub repo Superscrollorama (by John Polacek) Not to be outdone, the same developer has provided a similar plugin, this time with all sorts of extra effects including scaling, smushing, horizontal page slides, page wipes, bounces, flinging, and more. GitHub repo View demo | GitHub repo GitHub repo | A similar tutorial View demo Documentation

A Unified Approach to Client-Side Storage Papa's Perspective A Unified Approach to Client-Side Storage By John Papa08/31/2012 This simple API can give you a leg up on local storage in your Web apps. Web apps, generally, have sets of data that either don't change a whole lot, or that represent state -- the configuration, content and attributes -- which must be maintained between page calls. Why Use Storage? You can use cookies, but there are some limitations, which Christian Heilmann explains in his article, "Local Storage and How to Use It on Web Sites". Say you're building a Web app that supports multiple versions of different browsers. Unified API with Amplify.store This is the sweet spot for AmplifyJS, a library of jQuery components built by the folks at appendTo LLC. Note: If your browser doesn't support JSON2, you must include JSON2.js as well. Local storage stores a key value pair, where the key and the value are both strings. The following sample code defines an array of people objects: About the Author

The Web Platform: Browser technologies Banner Floating a banner or content definitely increases the visibility of them. But have some limitations (which we’ll remove). In general, floating banners are used when there is no other content at their column as they are always at the "float" (position:fixed) state. This is a better & smarter solution that will float the banners when needed, re-position them and can be used in any type of banner – content combinations. And, best of all, you don’t need to set any fixed heights in the code. We’ll be using jQuery but these simple functions can easily be ported to other JavaScript frameworks. Before reading further, here are the examples. Logic of this smart floating banners: The HTML: A standard 2 column webpage. <div class="mainWrap"> <div class="leftWrap">contents</div> <div class="rightWrap"> <div class="banner">banner</div> <div class="smartBannerIdentifier"></div> </div> </div> The CSS: The important part is, we are not setting CSS "fixed" position to the banner. JavaScript: Dependencies: P.S.

yeoman.io Working with CSS Media Queries and Media Types, Part 1 RELATED: "HTML5 and CSS3 Feature Detection with Modernizr" and "HTML5 Is in Style: Working with CSS3 and HTML5" The latest statistics on Internet consumption show that close to 9 percent of all web traffic now comes from mobile devices. That percentage is a significant increase over previous years and is certain to increase even more as consumers continue to purchase more and more devices. As a result of this massive shift to mobile, web application development is quickly switching from "Make it work cross-browser!" to "Get it to work in any browser on any device!" If you've been browsing websites from a mobile device, you've probably noticed that many sites aren't optimized for smaller screen sizes. CSS Media Types If you've ever printed a page and noticed that it looks different from the actual page displayed in the browser, you've more than likely witnessed a CSS media type in action. Figure 1: Defining a CSS media type for printing CSS Media Queries Testing CSS Media Queries

HTML5 Canvas Tutorials Dsfc - Denis Szalkowski Formateur Consultant - Conseil et formation informatique Cheap HTML5 web design templates

Related: