Manual:$wgSiteNotice

Details
This string will be displayed at the top of each page. Leave blank to disable.

In versions prior to 1.5 this is accomplished using MediaWiki:Sitenotice.

Apparently, in version 1.5, $wgSiteNotice could contain Wiki markup code ("WikiCode"). Since 1.6, WikiCode in the SiteNotice is not rendered any more (passed through as raw HTML). But then since 1.9 the SiteNotice has been wikitext again, not HTML.

In version 1.7 you may still edit MediaWiki:Sitenotice to put Wiki markup into a site notice. Using the $wgSiteNotice as mentioned above, will not allow you to use Wiki markup.