From W3C Tools Support Wiki
Jump to: navigation, search

In General...

After having used the MoinMoin platform for a few years, W3C has consolidated all its wikis in MediaWiki as of April 2010.

Posting Markup examples

Since it is possible to use some HTML and CSS markup within MediaWiki content, special care needs to be taken when you want to actually show markup examples to readers. As a community developing markup languages and standards, this is particularly relevant to W3C. This section outlines how to post markup examples in W3C wikis.

Several W3C wikis (including the main / top wiki) have the Geshi extension enabled. This is also in use in Wikipedia. See the MediaWiki GeSHi documentation pages for full details on its use. If your Wiki does not seem to have Geshi installed, talk to a W3C team contact. (note: how to check this easily?)


  • The Extension:SyntaxHighlight GeSHi tag displays formatted source code with the <syntaxhighlight> tag.
  • This extension also adds coloring according to the code language settings. Like the <pre> tags and the <poem> tags, the tags shows the coding exactly as it was typed, preserving white space.
  • This extension also can create line numbers.
  • See Singularity proposal in WebSchemas area of the wiki for an example use of this extension.

Note that the syntax highlighting extension requires your markup to indicate which of several supported languages you are using. At the time of writing, relevant languages include 'html4strict', 'xml'. For W3C use, e.g. with modern HTML5-based examples, this might not be enough. A work-around could be mark XML-shaped 'html' examples as 'xml', however that makes it hard to use certain non-XML features of HTML within examples. In such cases, the language type 'text' is available, but comes without syntax highlighting.

If you have other tips for sharing markup in W3C wiki pages, please add them here.

  • We can post examples here, if the extension is activated for Tools wiki. Otherwise see above links!
  • TODO: best practice for posting html5 examples within constraints of the extension

Related links:

  • danbri notes and tests, trying ill-formed examples with 'xml' and 'html4strict' settings (result: they seem tolerant/lax, which is good for us here as we often need to post examples of bad markup)