Posts Tagged ‘html5’

HTML5: <!DOCTYPE html>

Sunday, March 7th, 2010

All the cool kids have started using the new HTML5 doctype:

<!DOCTYPE html>

It triggers standards mode even in shitty browsers, so we can dump its verbose predecessor and start blazing a path of HTML5 glory.

HTML5: <meta charset="UTF-8">

Friday, March 5th, 2010

The old way:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

The HTML5 way, which works on all browsers:

<meta charset="UTF-8">

Even though the charset can and should already be set in the HTTP response header, the meta tag is still relevant when the document is offline.

Conway’s Game of Life on <canvas>

Tuesday, June 30th, 2009

With Firefox 3.5‘s release today, it’s time to start playing with HTML 5. <canvas> isn’t new to 3.5, but it is part of the proposed standard, along with other juicy stuff like <audio> and <video>.

I have first encountered John Conway’s Game of Life in a freshman CS course and implemented it using some primitive graphics library on C++. It was definitely much easier and more straightforward using <canvas> and JavaScript.

Note: This only works on the latest versions of non-shitty browsers like Firefox, Safari, Chrome and Opera. There are <canvas> APIs built on top of VML for IE, but *shrug*.

Check it out!