HTML5 Boilerplate is a kickass base template for website development

HTML5 is the future of the web, but build­ing the future is hard work and so it’s always great to get a bit of help with that. Some of that help comes in the form of HTML5 Boilerplate from the minds of Paul Irish and Divya Mani, who have teamed up to bring us “the pro­fes­sional badass’s base HTML/CSS/JS tem­plate for a fast, robust and future-proof site”. Boilerplate is basi­cally a bunch of files, the exact kinds of files you would cre­ate as you start work­ing on a new web­site, except that these already con­tain the basic start­ing code and include all the best prac­tices baked in. Things like reset styles,pngfix, HTML5 markup and more. I went over most of it line by line and after a few adjust­ments based on my own per­sonal pref­er­ences I’m going to start using it as the base for all web­sites I work on.

Some of the rea­sons Boilerplate is awesome:

  • The index file has every­thing you’ll ever need in the <head>, even the stuff you might have not known you needed — like an empty con­di­tional com­ment so IE doesn’t choke up on its own code.
  • There are adjust­ments for mobile browsers as well as a ref­er­ence to an iphone com­pat­i­ble icon, because even if you don’t design for mobile specif­i­cally, it’s nice to pro­vide at least min­i­mal compatibility.
  • jQuery is included via Google API but it has a fall­back to a local version
  • YUI pro­filer and asyn­chro­nous Google Analytics are included
  • The scripts have a wrap­per for console.log so you won’t break any­thing if you for­get about it (I do it all the time)
  • In addi­tion to reset styles, a few basic and sim­ple styles are included that take care of com­mon tweaks, such as let­ter spac­ing, input fields align­ment, link out­lines, mono­space tags (like <code> and <pre>), and even the helper classes like clearfix.
  • On top of all that, which already clas­si­fies this as awe­some, there’s also crossdomain.xml (just in case you want to use it), robots.txt and .htaccess

And they’re not even done yet, as mini­fi­ca­tion script and gzip­ping are coming.

And just the other day they released an updated “bare bones” ver­sion of the the files, with­out com­ments. So, you can either get it zipped straight from the site, or go the the github project page.

Leave a comment

Safari gets WebGL in WebKit Nightlies

Well, those folks on webkit dev team sure are mov­ing fast. WebGL (OpenGL for web, i.e. fancy 3d graph­ics in your browser) spec hasn’t even been fin­ished yet, as far as I know, and they already have the stuff work­ing in the lat­est webkit builds. The good news about this is of course that as WebGL becomes more widely adopted, we’re going to see some inter­est­ing uses of 3D graph­ics for inter­faces on the web. Of course the flip­side of that is there’s a good chance that sud­denly dozens of sites will spring up with cheesy cubes or spheres rotat­ing with blink­ing colours or something.

Hopefully most uses of WebGL will be more sophisticated than that

Hopefully most uses of WebGL will be more sophis­ti­cated than that

WebGL itself is actu­ally pretty hard­core in com­par­i­son to stuff like HTML and JavaScript. It’s a true, honest-to-god pro­gram­ming lan­guage. Which means that even sim­ple things take a sub­stan­tial amount of code. Heck, even ini­tial­iz­ing the damn thing takes a whole func­tion. On the other hand, it’s also a very well estab­lished API (more specif­i­cally the OpenGL ES 2.0 API on which WebGL is based on) with plenty of resources, tuto­ri­als and web­sites that cover it from A to Z. So if you’re will­ing to roll up your sleeves and dig into it you’ll be mak­ing spin­ning cubes with blink­ing colours in no time.

For all the details and some exam­ple check out the WebKit blog.

Leave a comment

HTML5 Video and Audio Experiment

Gizmodo had a post on an HTML5 exper­i­men­tal page from 9Elements design stu­dio. If you have Firefox 3.5, Safari 4 or lat­est Chrome build you can check it out your­self here.

It’s really an amaz­ing piece of work — beau­ti­ful ani­ma­tions cou­pled with sound and neat inter­ac­tiv­ity (click­ing the lights dis­plays tweets about the page). All this is done with no Flash, or Silverlight or any­thing like that, though of course the code that runs all that isn’t exactly triv­ial, it’s all HTML5, JavaScript and Canvas.

I hope that we see more and more peo­ple tak­ing advan­tage of HTML5. Internet Explorer cur­rently sup­ports only a small sub­set of HTML5 spec and none of it is for some­thing like this. But if there’s enough push for HTML5, hope­fully either the other browsers will leave IE com­pletely in the dust and peo­ple will just stop using it (one can always dream), or Microsoft will wiseup and imple­ment proper stan­dards and HTML5 sup­port into IE.

[Gizmodo Post]

Leave a comment