<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tachyony.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Help%3AMarkup_validation</id>
	<title>Help:Markup validation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tachyony.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Help%3AMarkup_validation"/>
	<link rel="alternate" type="text/html" href="https://wiki.tachyony.co.uk/w/index.php?title=Help:Markup_validation&amp;action=history"/>
	<updated>2026-05-15T05:28:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://wiki.tachyony.co.uk/w/index.php?title=Help:Markup_validation&amp;diff=2443&amp;oldid=prev</id>
		<title>Tachyony: Imported page</title>
		<link rel="alternate" type="text/html" href="https://wiki.tachyony.co.uk/w/index.php?title=Help:Markup_validation&amp;diff=2443&amp;oldid=prev"/>
		<updated>2021-12-06T16:04:16Z</updated>

		<summary type="html">&lt;p&gt;Imported page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{information page|H:MARKV}}&lt;br /&gt;
The [[W3C Markup Validation Service]] lets editors check web pages for conformance to [[HTML]] and [[XHTML]] standards. It is helpful for catching minor problems such as duplicate section names or citation IDs. Although most major browsers will tolerate many of the errors, and will display a document successfully even if it contains errors, they may misbehave on documents that contain the errors: for example, they may go to the wrong section or citation if you click the mouse on a wikilink. Checking that a page contains valid HTML can thus fix these minor glitches while also increasing portability to unusual browsers.&lt;br /&gt;
&lt;br /&gt;
To check the HTML for a Wikipedia article &amp;#039;&amp;#039;XYZ&amp;#039;&amp;#039;, visit the service&amp;#039;s home page and enter the text &amp;quot;&amp;lt;code&amp;gt;&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;{{fullurl:XYZ}}&amp;lt;/span&amp;gt;&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Current issues ==&lt;br /&gt;
{{shortcut|WP:HTMLBUGS}}&lt;br /&gt;
These errors require developer fixes and should be ignored by editors. When checking for endemic errors, ensure a blank page is used, such as [[Special:BlankPage]].&lt;br /&gt;
* {{W3C validation|Special:BlankPage}}&lt;br /&gt;
&lt;br /&gt;
Any page with an edit link:&lt;br /&gt;
{{tracked|40385}}&lt;br /&gt;
* &amp;lt;code&amp;gt;Bad value edit for attribute rel on element link: Keyword edit is not registered.&amp;lt;/code&amp;gt; This issue does not show for [[Special:BlankPage]].&lt;br /&gt;
&lt;br /&gt;
Any page with a file (image):&lt;br /&gt;
* &amp;lt;code&amp;gt;Attribute srcset not allowed on element img at this point.&amp;lt;/code&amp;gt;&lt;br /&gt;
:This is allowed per the [http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#the-img-element HTML Living Standard]. &amp;lt;code&amp;gt;srcset&amp;lt;/code&amp;gt; allows the MediaWiki software to render alternate images based on the device capabilities. The W3C HTML validator has not yet been updated to support this and throws an error.&lt;br /&gt;
&lt;br /&gt;
Any page with a nonstandard language code:&lt;br /&gt;
* &amp;lt;code&amp;gt;Bad value &amp;lt;var&amp;gt;xxx&amp;lt;/var&amp;gt; for attribute lang on element a: The language subtag &amp;lt;var&amp;gt;xxx&amp;lt;/var&amp;gt; is not a valid ISO language part of a language tag.&amp;lt;/code&amp;gt;&lt;br /&gt;
:Some Wikipedias use language codes that are not listed per RFC 5646. See the deprecated and nonstandard languages at [[m:List of Wikipedias|List of Wikipedias]]. See also [[Help:Interlanguage links]].&lt;br /&gt;
&lt;br /&gt;
== Valid HTML ==&lt;br /&gt;
While current browsers are quite forgiving of HTML errors, invalid HTML can cause issues with accessibility, search engines and portability. Various browsers may handle errors differently, thus the display may differ.&lt;br /&gt;
&lt;br /&gt;
For most editors, creating valid HTML is not an issue. The [[MediaWiki]] software converts wikimarkup into valid HTML (with occasional bugs). The English Wikipedia has used [[HTML Tidy]], a now-outdated HTML4 library, to help ensure that common typos and mistakes are converted into proper HTML4.  However, Tidy could not fix all problems, there is no way to disable it for testing and validation will not show issues fixed by Tidy.  Furthermore, Tidy is [[:mw:Parsing/Replacing Tidy|slated for removal]] at Wikipedia, so previously overlooked errors need to be fixed.&lt;br /&gt;
&lt;br /&gt;
Portability issues occur when pages are exported to other wikis that do not use HTML Tidy and HTML errors are exposed.&lt;br /&gt;
&lt;br /&gt;
Editors who use referencing methods such as [[Wikipedia:Footnote3|Footnote3]] should always validate pages. Use of these templates make it very easy for an editor to create duplicate HTML ids, causing invalid HTML and in-page linking issues – this is probably the most common validation issue on Wikipedia. There is little or no error checking for manual templates.&lt;br /&gt;
&lt;br /&gt;
Editors who develop templates should always test various uses and ensure they render valid HTML.&lt;br /&gt;
&lt;br /&gt;
== Validation tools ==&lt;br /&gt;
The [[World Wide Web Consortium|W3C]] is the main international standards organization for the internet— they provide the [[W3C Markup Validation Service]]. Simply copy the full URL of the page to be validated and paste in into the validator. There is also a [[favelet]] that you can add to your browser bookmarks that will validate the current page.&lt;br /&gt;
&lt;br /&gt;
The WDG HTML Validator has a batch mode that allows a list of URLS to be validated.&lt;br /&gt;
&lt;br /&gt;
[[User:TheDJ/Sharebox|Sharebox]] is a user script that will add sharing links and include tools including W3C Markup Validation.&lt;br /&gt;
&lt;br /&gt;
== Common diagnostics and how to fix them ==&lt;br /&gt;
This section gives examples of diagnostics generated by the markup validation service, and suggests possible fixes. Diagnostics are by line and column of the generated HTML for the page. It may be helpful to obtain the HTML in order to understand the diagnostic. For example, if you using the [[Firefox]] browser, you can type control-U to see the HTML.&lt;br /&gt;
&lt;br /&gt;
=== ID already defined ===&lt;br /&gt;
:[[File:Deletion icon.svg|x15px|alt=|link=]] &amp;#039;&amp;#039;Line 630, Column 88&amp;#039;&amp;#039;: &amp;#039;&amp;#039;&amp;#039;ID &amp;quot;CITEREFBarker2008&amp;quot; already defined&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;...&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt; &amp;lt;span class=&amp;quot;citation&amp;quot; id=&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;abbr title=&amp;quot;Position where error was detected.&amp;quot; style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;C&amp;lt;/strong&amp;gt;&amp;lt;/abbr&amp;gt;ITEREFBarker2008&amp;quot;&amp;gt;Barker, Janice (2008-0&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;small&amp;gt;An &amp;quot;id&amp;quot; is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This error occurs if an article contains multiple invocations of the {{tl|citation}} template with the same author and year; the above error was prompted by an article that cited two different documents, both written by Barker in 2008. Disambiguate the citations by putting letters after the years (&amp;#039;&amp;#039;e.g.&amp;#039;&amp;#039;, {{para|year|2008a}}, {{para|year|2008b}}), or by using the [[Template:Citation#Anchored citations|&amp;lt;code&amp;gt;ref=&amp;lt;/code&amp;gt; parameter of {{tlf|citation}}]].&lt;br /&gt;
&lt;br /&gt;
HTML ids are only needed when using [[Help:Shortened footnotes|Shortened footnotes]] or [[WP:Parenthetical referencing|Parenthetical referencing]]. The {{tl|citation}} template always generates an HTML id; with [[Help:Citation Style 1|Citation Style 1]], this is optional and [[Help:Citation Style Vancouver|Citation Style Vancouver]] never creates ids.&lt;br /&gt;
&lt;br /&gt;
:[[File:Deletion icon.svg|x15px|alt=|link=]] &amp;#039;&amp;#039;Line 93, Column 231&amp;#039;&amp;#039;: &amp;#039;&amp;#039;&amp;#039;ID &amp;quot;ref_1&amp;quot; already defined&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;...ence plainlinks nourlexpansion&amp;quot; id=&amp;quot;&amp;lt;abbr title=&amp;quot;Position where error was detected.&amp;quot; style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;r&amp;lt;/strong&amp;gt;&amp;lt;/abbr&amp;gt;&amp;lt;nowiki&amp;gt;ef_1&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#endnote_1&amp;quot;&amp;gt;1&amp;lt;/a&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;...&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;small&amp;gt;An &amp;quot;id&amp;quot; is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This similar diagnostic occurs if an article contains multiple invocations of {{tl|ref}} with the same ID, for example, two instances of &amp;quot;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ref|1|1}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;quot;. To fix the problem, use different IDs. Templates using the &amp;lt;var&amp;gt;ref_&amp;lt;/var&amp;gt; id prefix include {{tl|ref}}, {{tl|ref label}}, {{tl|cref}} and {{tl|cref2}}.&lt;br /&gt;
&lt;br /&gt;
=== Missing alt text ===&lt;br /&gt;
:[[File:Deletion icon.svg|x15px|alt=|link=]] &amp;#039;&amp;#039;Line 135, Column 108&amp;#039;&amp;#039;: &amp;#039;&amp;#039;&amp;#039;required attribute &amp;quot;alt&amp;quot; not specified&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;...,107&amp;quot; title=&amp;quot;Hurricane Ida (2009)&amp;quot; /&amp;lt;/nowiki&amp;gt;&amp;lt;abbr title=&amp;quot;Position where error was detected.&amp;quot; style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;&amp;amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/abbr&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;small&amp;gt;The attribute given above is required for an element that you&amp;#039;ve used, but you have omitted it. For instance, in most HTML and XHTML document types the &amp;quot;type&amp;quot; attribute is required on the &amp;quot;script&amp;quot; element and the &amp;quot;alt&amp;quot; attribute is required for the &amp;quot;img&amp;quot; element....&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This diagnostic can result from use of the [[:mw:Extension:EasyTimeline/syntax|EasyTimeline]] extension, which does not support [[Wikipedia:Accessibility|accessibility]] and does not generate [[Wikipedia:Alternative text for images|alternative text]] for visually impaired readers. Such a problem can be fixed by redoing the timeline as text, as an image, or as an [[mw:Extension:ImageMap|image map]].&lt;br /&gt;
&lt;br /&gt;
=== Element dl is missing a required instance of child element dd ===&lt;br /&gt;
&lt;br /&gt;
:[[File:Deletion icon.svg|x15px|alt=|link=]] &amp;#039;&amp;#039;Error Line 78, Column 5&amp;#039;&amp;#039;: &amp;#039;&amp;#039;&amp;#039;Element dl is missing a required instance of child element dd.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;/dl&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;&amp;amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;small&amp;gt;Content model for element dl:&amp;lt;/small&amp;gt;&lt;br /&gt;
::: &amp;lt;small&amp;gt;Zero or more groups each consisting of one or more dt elements followed by one or more dd elements.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Definition lists are created with the wikimarkup &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt; to define a definition list and &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to define the item in the list. This diagnostic results when the &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; is missing.&lt;br /&gt;
&lt;br /&gt;
* Indentation is created using the &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; markup. This creates a definition list with no child element. {{phab|6521}}&lt;br /&gt;
* This also occurs when &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt; is misused to bold a line. Use the wikimarkup &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;#039;&amp;#039;&amp;#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to bold characters.&lt;br /&gt;
&lt;br /&gt;
== CSS validation ==&lt;br /&gt;
The W3C also has a CSS validator, but this is less of an issue when editing Wikipedia pages, as CSS is an option and CSS validation errors typically are due to problems with skins, not problems in individual pages.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* Template {{tl|W3C validation}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
*[http://validator.w3.org/ The W3C Markup Validation Service]&lt;br /&gt;
&lt;br /&gt;
*[http://validator.w3.org/favelets.html The W3C Markup Validation Service— Favelets For The Validator]&lt;br /&gt;
&lt;br /&gt;
*[http://jigsaw.w3.org/css-validator/ The W3C CSS Validation Service]&lt;br /&gt;
&lt;br /&gt;
{{Wikipedia technical help|collapsed}}&lt;br /&gt;
[[Category:Wikipedia editor help]]&lt;/div&gt;</summary>
		<author><name>Tachyony</name></author>
	</entry>
</feed>