Open main menu

Extension:HTML5Tags

MediaWiki extensions manual
OOjs UI icon advanced.svg
HTML5Tags
Release status: experimental
Implementation Tag
Description Allows some extra HTML5 tags in wiki code
Author(s) Leonard Wallentin (Rotseetalk)
Latest version 0.1 (2012-10-27)
MediaWiki 1.18.+
PHP 5+
Database changes No
License BSD 2-clause "Simplified" License
Download
README
Hooks used
ParserFirstCallInit
Translate the HTML5Tags extension if it is available at translatewiki.net
Check usage and version matrix.

The HTML5Tags extension allows a couple of HTML5 tags such as e.g. figure/figcaption in wiki code.

This extension remains useful as long as bug 23932 is not resolved.
Allowed tags
  • article
  • figure
  • figcaption
  • hgroup
  • mark
  • nav
  • section
  • time
  • footer
  • header

InstallationEdit

  • Download and place the file(s) in a directory called HTML5Tags in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/HTML5Tags/HTML5Tags.php";
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

If you want HTML5 tags to work properly in older versions of Internet Explorer, you will have to add a HTML5 Shiv script to your skin, e.g.:

<!--[if lt IE 9]>
     <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

There is no known way to make these tags fully behave in earlier versions of Internet Explorer for users with JavaScript turned off. That is the reason they are not allowed in wiki code in the first place.