Manual:Semantic Web

MediaWiki supports Semantic Web standards, directly in the core or through extensions. A distribution, Semantic MediaWiki also exists to offer a collection of extensions to achieve semantic goals.

Core support
Out of the box, MediaWiki offers full support for the Microdata standard and partial support for RDFa 1.0 standard.

Microdata
Microdata allows to integrate metadata in MediaWiki pages.

Specialized tools and search engines can exploit them to get more context for the content.

How to enable it?
Since MediaWiki 1.27, the support is enabled by default. If you use an older version (> 1.16), you need to add in your configuration (for example in LocaliseSettings.php):

$wgAllowMicrodataAttributes = true;

How to use it?
You can directly add HTML tags like  with Microdata attributes in the wiki code. If you use the Visual Editor, you need to switch back in code mode, as VE doesn't currently offer Microdata support.


 * Getting started with schema.org using Microdata
 * Rich Snippets article markup properties on Google for an example on how Microdata could concretely be used.

RDFa 1.0
RDFa is the main W3C semantic standard. HTML+RDFa allows to embed RDFa information in HTML source code.

Plans exist to upgrade this support to [HTML+RDFa 1.1 HTML+RDFa 1.1]. See Requests for comment/Update our code to use RDFa 1.1 instead of RDFa 1.0.

How to enable it?
Since MediaWiki 1.27, the support is enabled by default. If you use an older version (> 1.16), you need to add in your configuration (for example in LocaliseSettings.php):

$wgAllowRdfaAttributes = true;