Techniques » HTML5

Using HTML5 with your Thematic Child Theme

In the interest of keeping our websites “future-proof”, I began investigating using the HTML5 DOCTYPE.

As it turns out, the switch for most WordPress themes will be trivial:

  1. Change the doctype declaration to: <!DOCTYPE html>
  2. Remove the (now defunct) profile="..." attribute from the opening <head> tag.
  3. Remove the unnecessary <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> tag.
  4. Add the <meta charset="utf-8"> tag.

Normally, this would be easily found in the header.php file of your theme. In fact, the default WordPress theme (‘TwentyTen‘ as of WP3) automatically uses the HTML5 doctype declaration.

Thematic, however, uses the traditional “XHTML 1.0 Transitional” doctype (more…)

1