Category Archives: HTML

HTML5 Boilerplate Build Script: no manifest.appcache generated!

The HTML5 Boilerplate build script can auto gen­er­ate your manifest.appcache file but it doesn’t out of the box. Slightly hid­den away in the docs: To enable the appcache, just uncom­ment the file.manifest line in the project.properties file. It’ll cre­ate a manifest.appcache file and wire it all up. You’ll find the project.properties file in build/project. Now just do ant […]

Quickly Creating an HTML Link in JavaScript

A cool and little known JavaScript func­tion is .link() avail­able to all string objects. Calling string.link(url) returns an HTML string for an anchor tag with the URL in it. For example:   var text = ‘the best web­site ever’; var html = text.link(‘http://bencollier.net/’); html === “<a href=‘http://bencollier.net/’>the best web­site ever</a>” //true   A great way […]

Javascript — Is an Object Empty?

To check if an object is empty in Javascript:   Object.getOwnPropertyNames(obj).length === 0;   Where obj is the object you’re test­ing e.g.:   var obj = {}; Object.getOwnPropertyNames(obj).length === 0; //true   obj = {‘not’ : ‘empty’}; Object.getOwnPropertyNames(obj).length === 0; //false   Or to wrap it in a func­tion:   func­tion isEmpty(obj){ return (Object.getOwnPropertyNames(obj).length === 0); } […]

Katamari Hack

The win­ner of the 2011 Yahoo HackU con­test at University of Washington, this is so cool. Click here to activ­ate the Katamari Damacy effect. You can also install it as a book­mark­let by drag­ging: Katamari to your book­marks bar. It uses CSS3 trans­forms and html5 can­vas to do this awe­some effect. Hats off to the developers, this works […]

Instant Web with Chrome 9

Chrome 9 instant search: With Chrome Instant (à la Google Instant), web pages that you fre­quently visit will begin load­ing as soon as you start typ­ing the URL. (“Look, Mom — no enter key!”). If sup­por­ted by your default search engine, search res­ults appear instantly as you type quer­ies in the omni­box. To try out Instant, you’ll need […]

Silk HTML5 Canvas Generative Art

Somewhat hyp­notic gen­er­at­ive draw­ing web­site that uses HTML5 can­vas and lots of pretty col­ours. It records your draw­ings to share with oth­ers –http://weavesilk.com/?l1

CSS3 Wonder Wall 3D Demo

Currently only works in Safari 5 & Chrome 7 dev, but this Wonder Wall Demo is extremely awesome!

Unicorn — W3C Universal Validator

Unicorn — Universal Website Validator is a nice new val­id­ator tool from the W3C that runs their suite of tests on your site, check­ing for access­ib­il­ity and stand­ards com­pli­ance. Try it out for this site! — lots of CSS errors due to my use of vendor spe­cific pre­fixes, which I per­son­ally think, used with cau­tion, should be […]