I noticed that the <td align="center"> code works differently on the MediaWiki.org page and the en.wikipedia.org page. I type the same following test code on the both wikis:
- http://www.mediawiki.org/wiki/User:Scottie33/sandbox
- http://en.wikipedia.org/wiki/User:Scottie33/sandbox
Source (test) code:
<table border="1">
<tr>
<td align="center">
test test test test test test
test
<table border="1"><tr><td>
[[File:Information_icon.svg|20px]]
</td></tr></table>
test
</td></tr>
</table>
Why the MediaWiki.org page produce following (wrong) code:
<td style="text-align: center;">
instead (expected) of this:
<td align="center">
When
wgHtml5is enabled (which is enabled by default in the MediaWiki software, but disabled on most Wikimedia Foundation wikis, and has recently been enabled on mediawiki.org) then the Html processor in MediaWiki strips presentational attributes such as these, and replaces them with a rough equivalent inline style attribute.That system has a bug (filed as bug #36495 (bugzilla.wikimedia.org)) in scenarios such as these, because text-align or float alone doesn’t cover all of it.
See also:
But so much for the cause of the problem. Back to the issue at hand, the short version is: those attributes are deprecated, and you’re best off not using them in the first place.
Instead use CSS. Or, in this particular example (as Bergi mentioned earlier), there is an alternative method that is more appropriate: Use the
|center|keyword in the[[File:syntax.