The use <verbatim> tag allows for wiki pages to be injected with HTML code that MediaWiki traditionally does not render, such as <a> (anchor), <script> or <style> tags.
This allows for communities to use code snippets provided by third-party providers, such as for Twitter or Facebook feeds, and integrate them into the wiki.
Prior to Use
Enclose the name of the MediaWiki page you want to inject in verbatim tags and leave out the "MediaWiki:" part at the beginning:
Step by Step
- Write out the desired HTML code or obtain the HTML from a trustworthy third party site.
- Create a MediaWiki page for the code to reside on, giving it a name that describes the purpose of the code. For example, if you are trying to embed a Twitter widget into the wiki, consider naming the page MediaWiki:TwitterWidget.
- Place the code inside the MediaWiki page. Pay careful attention that all tags opened, such as <div> or <span>s have a corresponding closing tag (i.e. </div> or </span>).
- Save the MediaWiki page. More likely than not, it will not render in an aesthetically pleasing way. Don't worry about how the MediaWiki page looks, it will look better once the verbatim tag is invoked.
- Go to the page that you wish to include the HTML code in. You will then invoke a complete verbatim tag set (<verbatim></verbatim>) with the MediaWiki page name between the opening and closing tags. For example, if we were to have had a MediaWiki page named MediaWiki:TwitterWidget, one should add to the page:
When verbatim tags surround the name of a page that doesn't exist, for example <verbatim>Baz</verbatim>, the output is that string surrounded by greater-than and lesser-than signs (in this case <Baz>).