see templates/global.tpl, there are some explanations in the file. and these rules apply to all .tpl files in G2. copy the file to a subfolder called local and apply your changes there.
ordinary html can be used, {php}{/php} braces are required if you want to use php.