background preloader

HTML

Facebook Twitter

Marinski Handmades. Working with quota on mobile browsers: A research report on browser storage. Introduction One of the biggest evolutions happening around HTML5 today is the availability of persistent storage on browsers.

Working with quota on mobile browsers: A research report on browser storage

Before HTML5, we had no choice other than using cookies to store some kind of data on client side. With HTML5, you have several choices for storing your data, depending on what you want to store. The most broadly used technology is called WebStorage, an API for persistent key-value data storage which most major browsers have supported for a while. WebStorage has persistent storage called LocalStorage, and temporary storage called SessionStorage which will be cleared after a session. WebSQL Database is a relational database solution for browsers. Indexed Database is an object store. FileSystem API is a file system solution for the web. Application Cache is a powerful cache mechanism targeting single page applications on browsers. As web apps get richer and richer, more and more developers are using browser-side storage.

Overview Mobile Desktop. Web Design Weekly #125. Headlines Optimising Web Font Rendering Performance Just because the page is using a web font, or several, doesn’t mean it will (or has to) render slower.

Web Design Weekly #125

A well optimised site can deliver a better and faster experience by using web fonts. In this article Ilya Grigorik explains how. (igvita.com) The Design Kickstarter Bundle (400+ items) Full of more than 400 different pieces, you’ll get loads of new textures, Photoshop brushes, vector elements, swoosh typefaces, Photoshop action sets, and more! Articles Is putting the CSS in the head a good idea? Hans Christian Reinl explores the downsides of placing CSS in your HTML head instead of referencing external files.

Using the HTML title attribute - updated. The main element. Creating an HTML5 Responsive-Ready Contact Form with JavaScript Detection. HTML5 brings many great features that we can start using now, and many of them lie within forms and inputs.

Creating an HTML5 Responsive-Ready Contact Form with JavaScript Detection

Some HTML5 enhancements often require fallbacks for our projects, through polyfills or fallbacks. Here we will show you how to create an HTML5 enhanced responsive-ready contact form with custom JavaScript feature detection. Creating an HTML5 Responsive Contact Form In this tutorial, we'll create a responsive contact form that will include the following features: HTML5 input attributesHTML5 enhanced input typesHTML5 semanticsFluid and responsive designCustom JavaScript feature detectionHTML5 fallback setup Markup First we'll start with the markup, for which we'll first setup a basic form structure. HTML5 introduces a few new attributes that we can add to our inputs, but first let's look at our labels. The issue with keeping labels looking like they're inside the form field is; when the user starts typing, the meaning of the input is removed and is no longer visible.

Structural Semantics — The Importance Of HTML5 Sectioning Elements. Advertisement Whatever you call them — blocks, boxes, areas, regions — we’ve been dividing our Web pages into visible sections for well over a decade.

Structural Semantics — The Importance Of HTML5 Sectioning Elements

The problem is, we’ve never had the right tools to do so. While our interfaces look all the world like grids, the underlying structure has been cobbled together from numbered headings and unsemantic helper elements; an unbridled stream of content at odds with its own box-like appearance. Because we can make our <div>s look but not behave like sections, the experience for assistive technology (AT) users and data-mining software is quite different from the experience enjoyed by those gifted with sight. Now that HTML5 has finally made sectioning elements available, many of us greet them with great reluctance. Make no mistake: Sectioning elements help you improve document structure, and they’re in the spec’ to stay.

On the styling of forms. The earliest incarnation of the specification that we now call “HTML5″ was an extension of HTML forms, called Web Forms 2.0 (Working Draft 5 February 2004 – almost nine years ago!).

On the styling of forms

It contained lots of cool stuff that’s in the spec today, like <input type=”date”>, <input type=”email”>, the required attribute, and cool stuff that never made it to the final spec like <input type=”location”> and repeating templates (the latter was implemented in Opera, and subsequently removed in 2010). When I first started talking about HTML5, I’d show these new forms controls to developers, who were all initially very excited. After all, who wants to code JavaScript date-pickers, or email validation routines?

But the excitement dissipated after the inevitable question about how you can style the forms and their error messages. If the element is required, the preceding rules apply only if the user has changed the value or attempted to submit the form. Quite. …but to no avail. As Tab Atkins continued: Defending Presentational Class Names. Should presentational class names always be avoided or is that too dogmatic?

Defending Presentational Class Names

As web development changes, perhaps it's time to reexamine the issue. The use of presentational class names in web development has been considered a bad practice for about as long as classes have been around. The notion is so ubiquitous that when making that claim, few people even bother to justify it anymore, as if it’s self-evident. Even the HTML5 specification draft states the following: authors are encouraged to use [class names] that describe the nature of the content, rather than [class names] that describe the desired presentation of the content They never say why you’re encouraged to do this.

However, recently an increasing number of people have started to question this age-old advice. Simplequiz #7: Pinterest. One of our readers commented on an article a while ago (I won’t tell you which one just now ;) asking about marking up items on Pinterest.

Simplequiz #7: Pinterest

It struck me that this would be a prime candidate for a Simplequiz, so here we are. Pinterest, for the uninitiated of you, allows you to organise and share things you love — mostly food, drink, and kittens. We’re going to look at how to mark up a single pinned item, as shown below: The existing markup is below (I’ve simplified it a little to make it easier to read): <div class="pin"> <div class="pin-holder"> <div class="actions"> <a href="#repin">Repin</a> <a href="#like">Like</a> <a href="#comment">Comment</a> </div> <a href="me/cat/"> <img src="cat.jpg" alt="My awesome cat"> </a> </div> <p>Awesome cat description.

So, all’s well and good, but how should it be marked up in HTML5? Let us know which answer you would go with (or roll your own) in the comments. The Importance Of Sections. <section> - HTML.