headerbanner

How to set the head section of Joomla 3.2 to HTML5

Autor: Fox

HTML5 standard requires different meta tags and script and link tags without a 'type' attribute. Put next code into a template file index.php:

 
<?php
$doc = JFactory::getDocument();
$doc->setHtml5(true);
?>

This code makes the following changes:

<meta http-equiv="content-type" content="text/html; charset=utf-8" /> -> <meta charset="utf-8" />
 
<script type='text/javascript'...> -> <script ...>
<link rel="stylesheet" type="text/css" href= ...  /> -> <link rel="stylesheet" href= ... />