Wikipedia:HTML5

The development of HTML5 is now so far advanced that it was incorporated into the MediaWiki software and has been the default on Wikimedia wikis since September 2012.

This project serves to help editors organize the adaptation of articles and other Wikipedia pages to HTML5. The fifty or so prepared searches reveal the obsolete tags. The edits range from simple to complex, and the numbers from a few fixes anyone can enjoy updating manually, up to many thousands for a run with a AutoWikiBrowser bot script.

Scope
Implementation of the new HTML5 attributes accepted by MediaWiki software. These include:
 * The  attributes in table cells for sorting. This is associated to the replacement of templates like Sort, Sortname, Number table sorting, and Dts.
 * Other data attributes.


 * The following attributes relevant for Wikipedia tables are also considered obsolete in HTML5:,  ,  ,  ,.
 * The following elements were formerly obsolete in HTML4 and "rehabilitated" in HTML5:  and

Obsolete elements and attributes
These elements and attributes should no longer be used on Wikipedia pages. See each element or attribute's details for its recommended replacement.

Text
For most text,  can be replaced with center.

Templates
To center templates, check the template documentation as most have a parameter for general styling or specifically for alignment. If the template does not have an alignment parameter, consider adding one.

Searches for templates do not find redirects, but you can alter the query to complete the search for that template's obsolete usage: for each template list its redirects with the "What Links Here" tool, and replace the two occurrences of its template name. Do this for each of its redirects in turn.

Parser tags
Some parser tags can use CSS styles:

And likewise to center a cell:

Header cells are centered by default.

font
The element has three attributes with equivalent CSS properties:

Note that for color names, only the W3C specified basic and extended colors are valid with CSS. accepts arbitrary strings for color names; CSS does not support these. When converting to CSS, these strings can be replaced either with a sufficiently similar hexadecimal color code or a valid color name that is nearest to their shade. For example:

Hexadecimal color codes without the  prefix are valid with, but   is mandatory with CSS. Only 3 and 6 digit hex codes are valid in CSS. When 4 and 5 digit codes have to be converted to CSS, they need to be appended with 00 and 0 respectively. For 8 digit hex codes, the last two digits have to be discarded.

Note that in HTML the value for the  attribute does not correspond to any CSS value; it only accepts values 1 through 7.

The above searches will find all permutations of the three color attributes. For example:

strike
 formats strike-through characters.
 * Use  for text that is no longer correct, accurate, or relevant.
 * Use  for text that has been deleted or marked for deletion.

tt
 formats text in a fixed-width font.
 * Use or  for source code.
 * Use or  for computer input (it need not represent actual keystrokes)
 * Use or  for sample output from a program or system (can include directory listings and other matter)
 * Use or  for variable names (in code, mathematics, or even syntactic variables in regular writing).
 * Use for monospace-styled text without the semantics of any of the above.

Table attributes
Obsolete table attributes.

Allowed, obsolete but rarely used table attributes:
 * : Use CSS for borders.
 * : Use CSS for borders.
 * : Use on the table header.
 * on.
 * : Use  or.

Additionally, these attributes are obsolete on table cells.
 * : Elaborate content of the cell
 * on table cell: is valid only on table header

There are instances where a table is used to align a template. In many cases the template has an alignment parameter; if not, one should be added.

Other obsolete attributes

 * on


 * on

Obsolete, allowed but rarely used attributes:
 * on 
 * on  through 
 * on <li ></li>
 * on
 * on <pre ></pre>
 * on <ul ></ul>

cite
Under the previous HTML 4.01 and XHTML 1.1 usage <cite ></cite> defined an entire citation. With HTML5, a long-running dispute has erupted:
 * The W3C specs preserve the broad usage, though now require that the material contain at least one of: the title of the cited work, its author, a URL to the work, or an abbreviated reference (short citation, as used in Harvard referencing). This is the spec followed by most Web developers.
 * The WHATWG specs have limited the element to the title of the work . This is the spec followed by most browser developers. The only practical implications of WHATWG's break from W3C on this element is that the default browser treatment of the element (to italicize its content) would be applied to more material than the title. However, Wikipedia's site-wide CSS turns off this stylization anyway (per MOS:TITLES, only titles of particular kinds of works should be italicized).

W3C briefly switched to WHATWG's definition in the draft stages of HTML5, but switched back to their own definition in 2012 after protest from the Web developer community. This difference subsequently disappeared when the W3C's version was subsumed into the WHATWG's version in the late 2010s and now the WHATWG's version is the only version in relation to the cite element.

Following common practice (e.g. the use of around links to author IDs in blog and forum software, and many other well-deployed uses for the element for more than work titles), Wikipedia is following the W3C HTML5.2 Recommendation, which has superseded HTML 4.01, XHTML 1.1, and all other previous W3C [X]HTML specs.

Note that uses of exist without the closing, or incorrectly closed by ; these need to be repaired.

Where used with a or  template, a manually-added  should be removed as redundant markup:

Where an anchor id is manually used with a citation template, the id should be moved to the {{para|ref}} parameter. Additionally when removing cite tags with  please understand that this was a manual reference, and {{em|must be updated}} by removal, then making sure that the all the numbered {{para|last}} parameters such as {{para|last1}} are available, which in turn may require changing any (deprecated) numbered {{para|author{{var|x}}}} parameter used into a {{para|last{{var|x}}}} parameter and a matching {{para|first{{var|x}}}} one. See the example with and without the  and {{para|author3}}, below.

Collection of further ideas

 * A bot to insert data attributes based on the syntax of the SortKey. ÅñŧóñŜûŝî (Ð)
 * Warn the user using Special:AbuseFilter.
 * Adapt de:MediaWiki:Gadget-Extra-Editbuttons.js (discussion)
 * Adapt de:Benutzer:PerfektesChaos/js/WikiSyntaxTextMod

Participants

 * All the best: Rich Farmbrough, 20:04, 15 October 2015 (UTC).


 * Good to go. &mdash; Cp i r al  Cpiral  07:25, 23 December 2015 (UTC).


 * I'm ready! User:TurboSonic, 2:30 12 March 2019 (UTC).


 * Been at this for years already.  — SMcCandlish ☏ ¢ 😼  06:41, 3 May 2019 (UTC)