Add Support for HTML5

This document is deprecated! The information on this page refers to a Thesis version that is now obsolete. Please visit the Thesis Docs for current documentation.

The web is abuzz with HTML5: new tags, new capabilities, and it increasingly seems that the only limits facing designers these days are limits of imagination rather than browser capability.

If you’re wanting to make use of the latest tags — such as section or canvas — within your content, you’ll first want to get Thesis to output as an HTML5 document, which is easier than you might think.

Simply paste the following block of code into your custom_functions.php file:

/** Add support for HTML5 **/
/* Output an HTML5 document type */
function html5_doctype($content) {
	return '<!DOCTYPE html>';
}
add_filter('thesis_doctype', 'html5_doctype');

/* Remove PROFILE attribute from HEAD tag */
function html5_profile_removal($content) {
	return '';
}
add_filter('thesis_head_profile', 'html5_profile_removal');

Have you created an amazing HTML5 Thesis mod? Be sure to share it on Twitter!