The obsolete-tag error is the result of deprecated HTML elements.
Since it is unclear to us at this time how far we want to push this goal of HTML5 compliance, this category is marked low priority. Some wikis might choose to not address this right away. Other wikis might want to get ahead and want to be HTML5 compliant. It is possible that some wikis might write bots to address this. So, please use your judgement and wiki-specific policies to guide you in how much effort you want to spend on this. If, in the future, there is greater clarity about pursuing this more aggressively, we will reflect that by updating the severity of this linter issue appropriately.
Currently, the deprecated elements with their alternatives are:
|Deprecated tag||Replacement||Example||Example display|
|<center>||<div style="text-align: center;">||
|<font color="x" size="y" face="z">||<span style="color: x; font-size: y; font-family: z;">||
||This is Times New Roman|
|<strike>||<del> (for marking an edit)||
|<s> (for anything else)||
||Photon Torpedoes |
|<tt>||<code> (preferred for source code)||
|<kbd> (preferred for user input)||
|<var> (preferred for variables)||
|<samp> (preferred for output, function and tag names, etc.)||
|<span style="font-family: monospace;"> (preferred for everything else)||
|<font size=...>||<span style="font-size: ...;">||<span style="font-size: ...;">||<span style="font-size: ...;">|
|font-size: xx-small||font-size: 71%||font-size: 0.71em|
|font size=1||font-size: x-small||font-size: 79%||font-size: 0.79em|
|font size=2||font-size: small||font-size: 102%||font-size: 1.02em|
|font size=3||font-size: medium||font-size: 126%||font-size: 1.26em|
|font size=4||font-size: large||font-size: 142%||font-size: 1.42em|
|font size=5||font-size: x-large||font-size: 189%||font-size: 1.89em|
|font size=6||font-size: xx-large||font-size: 252%||font-size: 2.52em|
|size=7||size: 378%||size: 3.78em|
Values above 7 are equivalent to 7. Sizes with percent or em are approximate matches and may depend slightly on browser and other variables.
Font sizes prefixed by plus or hyphen, e.g.
<font size=+2> or
<font size=-1>, are equivalent to 3 plus or minus that number.
Mediawiki currently whitelists these elements, and they tend to be output the same way as input. This means that when browser vendors decide to remove these they will simply display as regular undecorated text. Examples of some "popular" html tags that had visual effects and have been removed from major browsers include
<basefont>. A further problem is that different browser vendors may remove them independently so editors or readers may have inconsistent views of the same page, leading to confusion.
Such removal of styling or unique treatment of html tags by browser vendors can happen at any time and without prior notice.
<font color="x"> accepts numeric font colors without the standard pound sign prefix. However, with
<span style="color: x;">, the pound sign before numeric font colors is mandatory:
<font color="x"> accepts some nonstandard font color names such as burntorange and vermillion, which are not on the list of 16 HTML colors or the list of 124 X11 colors. The replacement
<span style="color: ..."> markup recognizes only color names on these lists.
<font color="x"> accepts 4-digit and 5-digit hexadecimal codes, which need 00 and 0, respectively, appended in
<span style="color: ..."> markup.
|font markup||font display||span markup||span display|
The following tools can help fix obsolete HTML tags:
- WPCleaner: see instructions on how to use WPCleaner for fixing errors detected by Linter. Obsolete tags may be reported by WPCleaner as part of CheckWiki error #541.