background preloader

HTML5

Facebook Twitter

Developing a Responsive Website Part 4: Finishing The Homepage Portfolio Slider. This week we’re going to finish up the portfolio slider on our homepage that we have already started. At this point, if you view your index.php file and scroll down to the secondary screen it should look something like this. We’re close, all we have to do now is plug in our jQuery elements and then add some CSS to make our secondary portfolio slider screen responsive. Go ahead and download the Java files you’ll need from here, keep the js directory in your root folder and check out what out the image below to see what your finished product will look like.

Let’s begin in our index.php file. At this point you should have a fully functioning slider, but it’s not quite responsive yet. Follow that up by doing the same in our min-width: 768px / max-width: 991px, tablet portrait view query. Finally, our mobile view query for displays ranging from 0px to 767px wide is going to take a little more work than the others. Developing a Responsive Website: Secondary Page Part 2. We’re going to wrap up our tutorial on how to develop a responsive website this week by making our secondary page, well, responsive. We created our large layout for the page in our last tutorial, but now we want to make it fluid so that it will display nicely across various platforms, ranging from tablets and mobile devices to PC’s. Let’s take a quick peak at what we’re working towards. Notice how once we hit the skinnier, mobile version of the site we go to a more vertical layout.

This makes it easier to read the text as it allows someone browsing the page from their touch-screen mobile device to navigate the page with one hand, as they can hold the device in their palm while vertically scrolling with their thumb. The first order of business is to set some parameters for our main “services” id section under the landscape tablet media query. That does it for the landscape tablet view, so now let’s scroll down a little further in our main.css file and tweak the portrait view. That does it. 9 Ways to Speed Up Your Web Pages with HTML5. EmailShareEmailShare Like the article? Web developers are always looking for new ways to improve the speed and performance of the pages. With some of the new features available in HTML5, there are several ways that you can improve your web applications to give your user a better experience. We’ve compiled 9 easy-to-implement HTML5 tips and tricks here that would help you streamline your website without investing in additional infrastructure. 1.

HTML5 has introduced a whole new set of form attributes and input types to upgrade your existing HTML forms. Autofocus focuses the caret on page load so you can begin typing in the field immediatelyplaceholder allows you to set default text in a field that will clear when the field is clickedrequired will not let the form submit if the field is not filled outpattern lets you specify a custom regular expression that the field must meet Since these functions are now built-in, you will not need to create JavaScript functions to handle them. 2. 3. 4.

Using Modernizr to detect HTML5 features and provide fallbacks. Modernizr is a JavaScript library that detects which HTML5 and CSS3 features your visitor’s browser supports. In detecting feature support, it allows developers to test for some of the new technologies and then provide fallbacks for browsers that do not support them. This is called feature detection and is much more efficient than browser sniffing. Modernizr is very useful for detecting CSS3 support, but this article will focus on HTML5. It’s important to note that Modernizr doesn’t “fill in the gaps” (i.e., polyfill) for you. Versions of IE8 and below do not recognise new-in-HTML5 elements by default, so you have to fix this with some JavaScript. Modernizr does all this for you, so you don’t need include the Shiv. Getting Started # First, you need an HTML document: <! You can see in the code above that you need a modernizr.js file.

Also notice the second line of the HTML above: there is a no-js class on the <html> element. Here are two examples, one from Chrome 16 and one from IE9: 10 Tips for Developing Better jQuery Plugins. There are some great jQuery plugins. The better ones are adopted by thousands of web developers throughout the world.

Unfortunately, the worse ones fail and disappear into obscurity. Here are some tips to ensure your plugins reach their full potential… 1. Don’t Break the Chain Unless your plugin returns a value, the last line of your plugin function must be: return this; this ensures method calls can be chained, e.g. $("div#myid").yourPlugin().anotherPlugin().yetAnotherPlugin(); 2. In most cases, your plugin should simply work without the developer having to wade though documentation, set options or edit your plugin code. If it’s a visual widget, the developer shouldn’t need to edit any JavaScript.

<section class="myjqWidget"><p>My content</p></section> Your plugin can initialize itself, e.g. $(function() { $("section.myjqWidget").myjqWidget(); }); 3. There are a lot of jQuery plugins. Version numbering is also useful. 4. Never depend on ‘$’ referencing jQuery. 5. 6. 7. 8. Test it. 9. 10. HTML5 differences from HTML4. Abstract HTML is the core language of the World Wide Web. The W3C publishes HTML5, which is the fifth major revision of HTML. The WHATWG publishes HTML, which is a rough superset of HTML5. "HTML5 differences from HTML4" describes the differences of these documents from HTML4, and calls out cases where HTML is different from HTML5.

Status of this Document This section describes the status of this document at the time of its publication. This is the 29 March 2012 W3C Working Draft produced by the HTML Working Group, part of the HTML Activity. Publication as a Working Draft does not imply endorsement by the W3C Membership. This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. Table of Contents 1 Introduction HTML has been in continuous evolution since it was introduced to the Internet in the early 1990s. HTML4 became a W3C Recommendation in 1997. Defines a single language called HTML which can be written in HTML syntax and in XML syntax. 1.1 Open Issues. L'API WebSQL en HTML5 - Design et programmation web2 - Dji. Compatibilité: Introduction L'API Web SQL permet de créer une base de donnée, ajouter une table, etc. enfin bref d'avoir une base de données utilisable via le navigateur.

Le navigateur fournissant la gestion de base de données, elle peut être accessible en mode "offline" (en mode deconnecté). Ouvrir une connection Pour ouvrir une connection vers la base de données, on exécute le script suivant: if(window.openDatabase){ db = openDatabase(nom_de_la_base_de_données(string), version_de_la_base_de_données(string), commentaire_de_la_base_de_données(string), la_taille_estimé(entier), callback(function) ); } Il faudra lui spécifier une taille estimée d'au moins 2000000 octets sinon une Exception de type INVALID_STATE_ERR sera levée.

Exemple ouverture d'une connection vers une base de données: var db; if(window.openDatabase){ db = openDatabase('ma_base', '1.0', 'database', 2000000); } la fonction changeVersion() permet donc d'effectuer des modifications si le numéro de version a changé. Exemple SELECT.