Doing More with Less Code: @CSS1K

css code

This is what cascading style sheets look like.

Websites are getting fatter, Wired’s Webmonkey blog reports. The average page size (which includes the HTML, CSS, JavaScript, Flash and images that your browser has to download from a remote server) has grown from an average of 702KB in November 2010 to 965KB in December 2011. Webmonkey says:

Much of that added weight comes from JavaScript, but CSS shares some of the blame. According to HTTP Archive, the top 1,000 sites on the web load an average 30KB worth of CSS.

Inspired by CSS Zen Garden and driven by a desire to showcase what can be done with a mere 1KB of CSS, Jacob Rask, a web developer at Opera Software, created CSS1K about six months ago. Since then the site has showcased 68 different designs, all with stylesheets under 1KB.

Why is it a good idea to make your HTML and CSS files as small as possible? Not only will smaller files make sites load much faster for users, elegant (read: shorter) code is cheaper to create, cheaper to maintain and has a longer shelf life. Light code gives you a fast site that creates good experiences on all devices and connections.

Learn more about CSS

COMMENT