As I prepare to re-build my portfolio, I’ve been spending a lot of time just getting caught up on everything I’ve missed over the past year and a half. OK, well I haven’t been completely out of the loop, it just feels that way.
But as I go through my portfolio I’m treating it as a project. Starting out with content, building a site map and letting that lead to design.
The most frustrating part of the HTML5s is reading about built in form validation, easy video/audio and semantic tags that describe their content is the variations in browser support. So I’ve come up with a short list of things you can do now, that work across all browsers and don’t require JavaScript help.
Doctypes
Everyone’s seen this:
- <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
It’s excessively long and hard to memorize, and I have a 25 character Windows XP code committed to memory. Wouldn’t it be great to get rid of it? Well here is the HTML5 doctype, and you can start using it today:
- <!DOCTYPE html>
Charset
Not really revolutionary, but somewhat space saving, the meta charset declaration can be reduced from:
- <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
To:
- <meta charset=”UTF-8″ />
Other Space Savers
Script tags can be reduced to:
- <script src=”file.js”></script>
And those bad in-line styles can be wrapped in:
- <style>display: block;</style>
What Else?
Well sadly, nothing, without consideration for certain browsers that shall remain nameless. You can start to use HTML5 tags for some really semantic markup, but styling them can be problematic as some older, very widely used, browsers have no idea what you are talking about. You can use the HTML5 Shiv, but then you are requiring JavaScript.
Video tags are a great way to avoid having to pay for a quality flash player. But, if your browser supports the video tag, there is no guarantee it will support your format. You can convert your file to another format, but that’s making life hard again.
One day we can put all this talk behind us. It’s both scary and exciting to think that IE9 beta was released just last week. IE9 has implemented a ton of HTML5 features and done some crazy canvas optimizations. Yet IE6 still refuses to die and supporting 4 versions of IE is not very exciting news.