From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg

Release status:Extension status stable

ImplementationTemplate:Extension#type Tag, Skin
DescriptionTemplate:Extension#description Allows the inclusion of CSS style sheets within wiki pages
Author(s)Template:Extension#username Julian Porter & Ævar Arnfjörð Bjarmason (julianportertalk)
Latest versionTemplate:Extension#version 1.1.0 (2012-02-16)
MediaWikiTemplate:Extension#mediawiki 1.16+
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download Source Code
Hooks usedTemplate:Extension#hook

Translate the NewPageCSS extension if it is available at translatewiki.net

Check usage and version matrix.

The NewPageCSS extension uses the tag <css> to include a CSS in the text of the wiki page; that CSS is then put into the header of the resulting HTML, and so formats your page. If you are creating a wiki page that ends up requiring a lot of style modifiers, it's probably simpler to put them into a CSS style sheet.


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


table.uc {
    border-collapse: collapse;

.uc th {
    background-color: #f2f2f2;
    border: 1px solid black;

.uc td {
    border: 1px solid black;

.uc td.pm {
    background-color: #ffa0a0;

<table class="uc">



See also[edit]

I would like to acknowledge the author of the original extension PageCSS (Ævar Arnfjörð Bjarmason), which I have updated so it will work with current versions of MediaWiki.