Monthly Archives: November 2010

It’s Safe to Use the HTML5 Doctype Today

If you’ve taken a look at Google’s source code lately (and really, who hasn’t?) you may have noticed that they’re already using the HTML5 doctype instead of either HTML4 or XHTML.

<!doctype html>

It’s certainly much easier to type that then hunt down and paste in the monstrosity required for HTML4 or XHTML.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

From what I’ve managed to divine from the inter-tubes, the doctype is fully backwards-compatible with aging browsers like Internet Explorer 6. It will ensure that your document is not rendered in quirks mode. Modern browsers, and validators, should recognize it specifically as the new doctype used for HTML5 documents as well.

As a matter of fact, it’s quite all right to start coding your documents as HTML5, so long as you stay away from shiny new features that haven’t been implemented satisfactorily across browsers yet. You probably don’t want to be using the canvas or video elements, for example, for anything on sites that have visitors using older browsers. (Not to mention that there’s a silly standards war going on involving video codecs…) But for the most part, HTML5 works like HTML4.

HTML5 defines an HTML syntax that is compatible with HTML4 and XHTML1 documents published on the Web, but is not compatible with the more esoteric SGML features of HTML4, such as processing instructions and shorthand markup as these are not supported by most user agents.

Some elements’ definitions have been changed slightly, but for the most part things are as they have been. It’s probably worth reading up on the differences between HTML5 and HTML4.

John Resig said it pretty well:

What’s nice about this new DOCTYPE, especially, is that all current browsers (IE, FF, Opera, Safari) will look at it and switch the content into standards mode – even though they don’t implement HTML5. This means that you could start writing your web pages using HTML5 today and have them last for a very, very, long time.

BlogBuzz November 27, 2010

Designing for iPhone 4 Retina Display

With the iPhone 4, and later the fourth-generation iPod Touch, Apple introduced a much higher density of screen for their mobile devices. The Retina Display, has the same dimensions as its predecessors, but there are twice as many pixels per inch. This makes for…

The iPad is the New iPod

Remember when every company developing a portable music player called it “The iPod Killer?” There were plenty of media players, but all the general public wanted was the iPod. The one device made the MP3 player market, previously a “geeky” thing, mainstream. There were…

BlogBuzz November 20, 2010

Optimize a Website for iPhone Using Only CSS

Lots of websites now have mobile versions that optimize their designs for speed and ease-of-use on the iPhone, reducing scripts and designing for the device’s smaller screen. They usually use some sort of browser detection script that loads a different template on the mobile…

iOS UIFileSharingEnabled Property List Flag

Here’s a tip for you iOS developers. Have you ever noticed how some apps let you copy files back and forth between their Documents directories and your computer from within iTunes? It’s very easy to implement it yourself. As a matter of fact, it’s…

Twitter Blackbird Pie for WordPress

Want to easily embed individual twitter messages in your blog posts? There’s a WordPress plugin for that. Twitter Blackbird Pie adds several options that allow you to embed a nicely-rendered HTML representation of a tweet. It adds buttons to the editor, shortcodes, even oEmbed…

BlogBuzz November 13, 2010

WordPress to Gain Tumblr-Style Post Formats

I’ve talked a little before about how WordPress 3.0’s custom post types made it possible, if you don’t mind doing a bit of coding, to turn your WordPress blog into a “tumbleblog.” A little while after, WooThemes released a plugin to make it a…