archive: May 2010

02
MAY
2010

WordPress & HTML5

Posted by Shane

I am hoping a lot of you out there that read my blog are design and wordpress users because changing your site to conform to HTML5 will not be that hard. I have changed 3 lines.

Index: E:/My Site/Code/trunk/header.php
===================================================================
--- E:/My Site/Code/trunk/header.php    (revision 252)
+++ E:/My Site/Code/trunk/header.php    (working copy)
@@ -1,6 +1,6 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
-<head profile="http://gmpg.org/xfn/11">
+<!DOCTYPE html>
+<html <?php language_attributes(); ?>>
+<head>
 <title><?php wp_title(' | ', true, 'right'); ?><?php bloginfo('name'); ?></title>

 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
@@ -59,7 +59,7 @@
 </div>
 <div id="content">
 <div id="logo">
-        <a id="site-link" href="/" title="<?php bloginfo('name'); ?> | <?php bloginfo('description'); ?>" />
+        <a id="site-link" href="/" title="<?php bloginfo('name'); ?> | <?php bloginfo('description'); ?>"></a>
 </div>
 <div id="header-navigation">
 <ul id="main-navigation">

After that it was pretty much valid for HTML5 through out the entire site. Pretty sweet huh? Oh.. site validates now with HTML5. :) You should still run your site through the vaildator to make sure that nothing else is messed up, but all my pages complied the first time and that was from XHTML 1.0 to HTML5.

Comments 3

Commenting is now closed