<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Usome</id>
	<title>WHATWG Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Usome"/>
	<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/wiki/Special:Contributions/Usome"/>
	<updated>2026-05-14T04:39:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=HTML_vs._XHTML&amp;diff=2487</id>
		<title>HTML vs. XHTML</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=HTML_vs._XHTML&amp;diff=2487"/>
		<updated>2007-08-31T06:21:45Z</updated>

		<summary type="html">&lt;p&gt;Usome: /* Translations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Differences Between HTML and XHTML ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please note that the information in here is based upon the current spec for (X)HTML5.  Some of the issues technically do not apply to previous versions of HTML.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Although HTML and XHTML appear to have similarities in their syntax, they are significantly different in many ways.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Note&#039;&#039;&#039;: As the current WHATWG document is a draft, this section will need to track to a moving target.&lt;br /&gt;
 Differences marked @@@ are differences that could theoretically be changed without affecting &lt;br /&gt;
 backwards compatibility.&lt;br /&gt;
&lt;br /&gt;
=== MIME Types ===&lt;br /&gt;
&lt;br /&gt;
* XHTML must be served with an XML MIME type, such as &amp;lt;code&amp;gt;application/xml&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;application/xhtml+xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
* HTML must be served as &amp;lt;code&amp;gt;text/html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
It is the MIME type that determines what type of document you are using.  If you use attempt to send XHTML as &amp;lt;code&amp;gt;text/html&amp;lt;/code&amp;gt;, you are actually just using HTML, possibly with syntax errors.&lt;br /&gt;
&lt;br /&gt;
Technically, according to the spec, XHTML 1.0 is allowed to be served as &amp;lt;code&amp;gt;text/html&amp;lt;/code&amp;gt;.  But, due to the above reason, such a document is considered to be an HTML document, not an XHTML document.&lt;br /&gt;
&lt;br /&gt;
=== Parsing ===&lt;br /&gt;
&lt;br /&gt;
XHTML uses XML parsing requirements. HTML uses its own which are defined much more closely to the way browsers actually handle HTML today.&lt;br /&gt;
&lt;br /&gt;
* In XHTML, well-formedness errors are fatal. In HTML, error handling rules are much more graceful. Well-formedness errors, which are also syntax errors in HTML, include the following:&lt;br /&gt;
** Unencoded ampersands (&amp;lt;code&amp;gt;&amp;amp;amp;&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;&amp;amp;amp;amp;&amp;lt;/code&amp;gt;), and less than signs (&amp;lt;code&amp;gt;&amp;amp;lt;&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;&amp;amp;amp;lt;&amp;lt;/code&amp;gt;) (This does not apply to &amp;lt;code&amp;gt;CDATA&amp;lt;/code&amp;gt;). (Note: in HTML, an unencoded ampersand is allowed in some cases.)&lt;br /&gt;
** Comments containing extra pairs of hyphens or ending with a hyphen. e.g.&lt;br /&gt;
*** &amp;lt;code&amp;gt;&amp;amp;lt;!--&amp;lt;var&amp;gt; syntax -- error &amp;lt;/var&amp;gt;--&amp;amp;gt;&amp;lt;/code&amp;gt; or&lt;br /&gt;
*** &amp;lt;code&amp;gt;&amp;amp;lt;!--&amp;lt;var&amp;gt; syntax error -&amp;lt;/var&amp;gt;--&amp;amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
** Mismatched end tags (does not apply to elements with optional tags) &lt;br /&gt;
** Unclosed tags.&lt;br /&gt;
** Unexpected characters occuring in or before attribute names.&lt;br /&gt;
** Unexpected occurrence of EOF.&lt;br /&gt;
** Unexpected characters before the DOCTYPE name.&lt;br /&gt;
** Missing DOCTYPE name.&lt;br /&gt;
** A &amp;lt;code&amp;gt;PUBLIC&amp;lt;/code&amp;gt; identifer in a &amp;lt;code&amp;gt;DOCTYPE&amp;lt;/code&amp;gt; without a &amp;lt;code&amp;gt;SYSTEM&amp;lt;/code&amp;gt; identifier (Note: including either of these is a syntax error in HTML5; but, in XML only the &amp;lt;code&amp;gt;SYSTEM&amp;lt;/code&amp;gt; identifier is allowed to occur on its own).&lt;br /&gt;
** End tags with attributes. &lt;br /&gt;
** Unexpected end tags (in HTML, an unexpected &amp;lt;code&amp;gt;&amp;amp;lt;/br&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;lt;/p&amp;gt;&amp;lt;/code&amp;gt; can cause the start tag to be implied before it).&lt;br /&gt;
* The internal subset is permitted in XML, but meaningless (and forbidden) in HTML.&lt;br /&gt;
** In some cases, an internal subset in HTML would end up being partly rendered inline.&lt;br /&gt;
* The sequence of characters &amp;amp;quot;&amp;lt;code&amp;gt;]]&amp;amp;gt;&amp;lt;/code&amp;gt;&amp;amp;quot; in content when it does not mark the end of a &amp;lt;code&amp;gt;CDATA&amp;lt;/code&amp;gt; section is a well-formedness error in XHTML, but valid in HTML.&lt;br /&gt;
* In XHTML: &amp;lt;code&amp;gt;&amp;amp;lt;![CDATA[...]]&amp;amp;gt;&amp;lt;/code&amp;gt; is a &amp;lt;code&amp;gt;CDATA&amp;lt;/code&amp;gt; section. In HTML, it&#039;s a bogus comment.&lt;br /&gt;
* In XHTML, &amp;lt;code&amp;gt;&amp;amp;lt;?foo ...?&amp;amp;gt;&amp;lt;/code&amp;gt; is a processing instruction. In HTML, it&#039;s a bogus comment.&lt;br /&gt;
* In HTML, the trailing slash used for the empty element syntax is a parse error for non-void elements (see below), but is ignored in all cases.&lt;br /&gt;
* In HTML, the &amp;lt;code&amp;gt;script&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;style&amp;lt;/code&amp;gt; elements are parsed as &amp;lt;code&amp;gt;CDATA&amp;lt;/code&amp;gt;. (Note: the definition of &amp;lt;code&amp;gt;CDATA&amp;lt;/code&amp;gt; differs from that in XML). In XML, they&#039;re parsed as normal elements (which means that comments are treated as &amp;lt;em&amp;gt;real&amp;lt;/em&amp;gt; comments, and things that look like start tags actually are start tags).&lt;br /&gt;
* In HTML, the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; elements are parsed as &amp;lt;code&amp;gt;RCDATA&amp;lt;/code&amp;gt;. (Note: The definition of &amp;lt;code&amp;gt;RCDATA&amp;lt;/code&amp;gt; differs from that in SGML and there is no &amp;lt;code&amp;gt;RCDATA&amp;lt;/code&amp;gt; in XML).&lt;br /&gt;
* In HTML, if scripting is enabled, the &amp;lt;code&amp;gt;noscript&amp;lt;/code&amp;gt; element is parsed as &amp;lt;code&amp;gt;CDATA&amp;lt;/code&amp;gt;. If scripting is disabled, it&#039;s parsed as &amp;lt;code&amp;gt;PCDATA&amp;lt;/code&amp;gt;. In XHTML, the element has no effect, and can&#039;t really be used to stop content from being present when script is disabled.&lt;br /&gt;
* In HTML, the &amp;lt;code&amp;gt;iframe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;noembed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;noframes&amp;lt;/code&amp;gt; elements are parsed as &amp;lt;code&amp;gt;CDATA&amp;lt;/code&amp;gt;. In XHTML, they are parsed as normal elements, and therefore do not stop content from being used.&lt;br /&gt;
* White space characters in attribute values are [http://www.w3.org/TR/REC-xml/#AVNormalize normalized] to spaces in XHTML.&lt;br /&gt;
* In HTML, elements with optional tags are implied in certain conditions.&lt;br /&gt;
* In HTML, &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; elements with tags occurring in the body are moved into the head. In XHTML, they stay where they were specified.&lt;br /&gt;
* In HTML, tags for certain elements, which appear out of context, are ignored. This includes &amp;lt;code&amp;gt;caption&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;col&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;colgroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;frame&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;frameset&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;head&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;option&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;optgroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tbody&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;td&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tfoot&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;th&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;thead&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tr&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The &amp;lt;code&amp;gt;plaintext&amp;lt;/code&amp;gt; element has a special parsing requirement in HTML. (It is, however, forbidden.)&lt;br /&gt;
* &amp;lt;em&amp;gt;Many other special handling of edge cases and error conditions, not all of which are listed here, occur in HTML.&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
* In HTML, [http://blog.whatwg.org/faq/#doctype the &amp;lt;code&amp;gt;doctype&amp;lt;/code&amp;gt; is required]. In XHTML, it is optional.&lt;br /&gt;
* In XHTML, tag names and attribute names are case sensitive. In HTML, they are case insensitive.&lt;br /&gt;
* In XHTML, non-empty elements require both a start and an end tag. In HTML, certain elements allow the omission of either or both:&lt;br /&gt;
** &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt; (both)&lt;br /&gt;
** &amp;lt;code&amp;gt;head&amp;lt;/code&amp;gt; (both)&lt;br /&gt;
** &amp;lt;code&amp;gt;body&amp;lt;/code&amp;gt; (both)&lt;br /&gt;
** &amp;lt;code&amp;gt;li&amp;lt;/code&amp;gt; (end tag)&lt;br /&gt;
** &amp;lt;code&amp;gt;dt&amp;lt;/code&amp;gt; (end tag)&lt;br /&gt;
** &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; (end tag)&lt;br /&gt;
** &amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt; (end tag)&lt;br /&gt;
** &amp;lt;code&amp;gt;colgroup&amp;lt;/code&amp;gt; (both)&lt;br /&gt;
** &amp;lt;code&amp;gt;thead&amp;lt;/code&amp;gt; (end tag)&lt;br /&gt;
** &amp;lt;code&amp;gt;tbody&amp;lt;/code&amp;gt; (both)&lt;br /&gt;
** &amp;lt;code&amp;gt;tfoot&amp;lt;/code&amp;gt; (end tag)&lt;br /&gt;
** &amp;lt;code&amp;gt;tr&amp;lt;/code&amp;gt; (end tag)&lt;br /&gt;
** &amp;lt;code&amp;gt;td&amp;lt;/code&amp;gt; (end tag)&lt;br /&gt;
** &amp;lt;code&amp;gt;th&amp;lt;/code&amp;gt; (end tag)&lt;br /&gt;
* In XHTML, empty elements may use either the empty element syntax (&amp;lt;code&amp;gt;&amp;amp;lt;br/&amp;amp;gt;&amp;lt;/code&amp;gt;) or have an end tag immediately follow the start tag (&amp;lt;code&amp;gt;&amp;amp;lt;br&amp;amp;gt;&amp;amp;lt;/br&amp;amp;gt;&amp;lt;/code&amp;gt;). In HTML, the empty element syntax (trailing slash) is allowed on void elements, but forbidden on other elements. However, it serves no purpose whatsoever and can be omitted. End tags for void elements are forbidden.&lt;br /&gt;
** &amp;lt;code&amp;gt;base&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt; link&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hr&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;br&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;img&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;embed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;param&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;area&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;col&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt;&lt;br /&gt;
** Note: the following are treated as void elements for the purpose in the parsing requirements, but, as they are obsolete and non-standard, the trailing slash is not permitted:  &amp;lt;code&amp;gt;basefont&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;gsound&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;spacer&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;wbr&amp;lt;/code&amp;gt;. (although, since these elements are not permitted anyway, it doesn&#039;t make much difference).&lt;br /&gt;
* HTML allows attribute minimisation (i.e. omitting the value), XHTML does not.&lt;br /&gt;
* HTML allows the use of unquoted attribute values, XHTML does not.&lt;br /&gt;
* XHTML allows the use of &amp;lt;code&amp;gt;CDATA&amp;lt;/code&amp;gt; sections, HTML does not.&lt;br /&gt;
* XHTML allows the use of processing instructions, HTML does not.&lt;br /&gt;
* In HTML, all entity references are predefined and do not require a DTD. But because there is no DTD for XHTML5, entity references cannot be used in XHTML. (excluding the 5 predefined entities: &amp;lt;code&amp;gt;&amp;amp;amp;amp;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;amp;apos;)&amp;lt;/code&amp;gt;&lt;br /&gt;
** You may provide your own DTD for use with your own validating parser, but be aware that browsers do not use validating parsers and will not read the DTD.&lt;br /&gt;
* The valid set of unicode characters  in XML 1.0 is limited beyond that in HTML.&lt;br /&gt;
* Namespace prefixes are permitted in XHTML. They are forbidden in HTML. &lt;br /&gt;
&lt;br /&gt;
=== Markup ===&lt;br /&gt;
&lt;br /&gt;
* The [http://blog.whatwg.org/faq/#namespace-decl namespace declaration] (&amp;lt;code&amp;gt;xmlns&amp;lt;/code&amp;gt; attribute) is required in XHTML.  The xmlns attribute is also allowed to appear on the &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt; element in HTML on the condition that is has the value &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** In HTML, the xmlns attribute has absolutely no effect. It is basically a talisman. It is allowed merely to make migration to and from XHTML mildly easier.  When parsed by an HTML parser, the attribute ends up in the null namespace&lt;br /&gt;
** In XML (with an [http://www.w3.org/TR/xml-names/ XML Namespaces]-aware parser), an xmlns attribute is part of the namespace declaration mechanism, and an element cannot actually have an xmlns attribute in the null namespace.  In DOM implementations, the attribute ends up in the &amp;quot;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.w3.org/2000/xmlns/&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;quot; namespace.&lt;br /&gt;
* XHTML allows non XHTML elements and attributes (in different namespaces) to be used, HTML does not.&lt;br /&gt;
* XHTML uses the &amp;lt;code&amp;gt;xml:lang&amp;lt;/code&amp;gt; attribute, HTML uses &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; instead,&lt;br /&gt;
* XML ID introduces &amp;lt;code&amp;gt;xml:id&amp;lt;/code&amp;gt;, which could be used in XHTML. In HTML it has no effect.&lt;br /&gt;
* In HTML, the &amp;lt;code&amp;gt;noscript&amp;lt;/code&amp;gt; element may be used. In XHTML, it is forbidden.&lt;br /&gt;
* HTML uses the &amp;lt;code&amp;gt;base&amp;lt;/code&amp;gt; element, XHTML uses &amp;lt;code&amp;gt;xml:base&amp;lt;/code&amp;gt; instead. &lt;br /&gt;
* In XHTML, &amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt; elements may contain structured inline level elements including &amp;lt;code&amp;gt;blockquote&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;dl&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;menu&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ol&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ul&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pre&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;. In the HTML serialisation, due to backwards compatibility constraints, this is not possible (though it may be done through DOM manipulation).&lt;br /&gt;
* In XHTML, &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; elements may contain child &amp;lt;code&amp;gt;tr&amp;lt;/code&amp;gt; elements. In the HTML serialisation, due to backwards compatibility constraints, this is not possible (though it may be done through DOM manipulation).&lt;br /&gt;
&lt;br /&gt;
=== Character Encoding ===&lt;br /&gt;
&lt;br /&gt;
* In XHTML, the XML declaration may be used to [http://blog.whatwg.org/faq/#charset specify the character encoding]. In HTML, the XML declaration is forbidden&lt;br /&gt;
* In HTML, the &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; element with a &amp;lt;code&amp;gt;charset&amp;lt;/code&amp;gt; attribute may be used instead. It is forbidden in XHTML and is ignored if included.&lt;br /&gt;
* The default character encoding for XHTML is, according to XML rules, &amp;lt;code&amp;gt;UTF-8&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;UTF-16&amp;lt;/code&amp;gt;. If the encoding is unspecified in HTML, it should be determined through implementation specific heuristics or fallback to a default value (Note: this section of the spec is not yet finished).&lt;br /&gt;
&lt;br /&gt;
=== Scripts ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;document.write()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;document.writeln()&amp;lt;/code&amp;gt; cannot be used in XHTML, they can in HTML. &lt;br /&gt;
* In XHTML, the use of the &amp;lt;code&amp;gt;innerHTML&amp;lt;/code&amp;gt; property requires that the string be a well-formed fragment of XML. &lt;br /&gt;
* DOM APIs are case sensitive in XHTML and some are case insensitive in HTML.  (This does not apply to elements which are not in the HTML namespace)&lt;br /&gt;
** Element.tagName, Node.nodeName, and Node.localName return the value in uppercase.&lt;br /&gt;
** Document.createElement() is case insensitive (the canonical form is lowercase).&lt;br /&gt;
** Element.setAttributeNode() will change the attribute name to lowercase.&lt;br /&gt;
** Element.setAttribute()   is case insensitive (the canonical form is lowercase).&lt;br /&gt;
** Document.getElementsByTagName() and Element.getElementsByTagName() are case insensitive.&lt;br /&gt;
** Document.renameNode(). If the new namespace is the HTML namespace, then the new qualified name must be lowercased before the rename takes place.&lt;br /&gt;
* In HTML, Document.createElement() will create an element in the HTML namespace.  In XML (including XHTML), the namespace is defined by both DOM2 and DOM3 to be null.&lt;br /&gt;
** In XHTML, browsers lack interoperability in this area.  In Firefox, the namespace is dependent upon the MIME type.  In Opera, it&#039;s dependent upon the root element and in Safari, it&#039;s always null.&lt;br /&gt;
&lt;br /&gt;
=== Stylesheets ===&lt;br /&gt;
&lt;br /&gt;
* Selectors, as used in CSS, match case sensitively in XHTML, but case insensitively in HTML.&lt;br /&gt;
* CSS requires special handling of the body element in HTML for painting backgrounds on the canvas, which do not apply to XHTML.&lt;br /&gt;
&lt;br /&gt;
== Differences Between HTML 4.01 and HTML 5 ==&lt;br /&gt;
&lt;br /&gt;
See [[Differences from HTML4]].&lt;br /&gt;
&lt;br /&gt;
== Differences Between DOM Level 2.0, 3.0 and the HTML 5 DOM APIs ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This section might belong on a separate page.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* TODO (need to talk about the changes to the DOM API that HTML5 is making, compared with DOM2 and DOM3)&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
* [http://meiert.com/de/publications/translations/whatwg.org/html-vs-xhtml/ German translation: &amp;quot;HTML 5 und XHTML 5 im Vergleich (WHATWG)&amp;quot;][http://www.usome.com]&lt;/div&gt;</summary>
		<author><name>Usome</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Link_Hashes&amp;diff=2486</id>
		<title>Link Hashes</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Link_Hashes&amp;diff=2486"/>
		<updated>2007-08-31T06:20:40Z</updated>

		<summary type="html">&lt;p&gt;Usome: /* Content-MD5 HTTP Header */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Many download sites, especially for software download, give hashes or digests for the file they distribute so that users can check the validity of the files once they&#039;ve downloaded it. The process for verifying the hash however isn&#039;t straightforward.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
A lot of software download pages already give you MD5 or SHA-1 digests values to check the validity of the downloaded file. Checking the file ensure that the downloaded file is same as the author of the page wanted to give you. Corrupted or tampered files can be detected that way.&lt;br /&gt;
&lt;br /&gt;
The problem is that there is no way to automate that verification process. To automate this process, a browser would need to extract the hash associated with the link on the original page.&lt;br /&gt;
&lt;br /&gt;
=== Current Usage ===&lt;br /&gt;
Some links to software download pages featuring hashes:&lt;br /&gt;
* Apple: [http://www.apple.com/support/downloads/securityupdate20060061039client.html Security Update 2006-006]&lt;br /&gt;
* [http://www.php.net/downloads.php PHP Downloads]&lt;br /&gt;
* Apache: [http://httpd.apache.org/download.cgi HTTP Server]&lt;br /&gt;
&lt;br /&gt;
Other examples can be found on the [http://microformats.org/wiki/hash-examples#Who_offers_MD5.2FSHA-1_checksums_with_software hash examples] page on the Microformat wiki.&lt;br /&gt;
&lt;br /&gt;
=== Benefits ===&lt;br /&gt;
Easier discoverability of tampered files which could come from a mirror server being hacked. &lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions ==&lt;br /&gt;
&lt;br /&gt;
=== hash attribute ===&lt;br /&gt;
A hash attribute could contain a md5 checksum of the target file. If the hash of the downloaded file does not match the one from the link, the file is deleted or quarantined and the user is alerted of a potential security risk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;...&amp;quot; hash=&amp;quot;b3187253c1667fac7d20bb762ad53967&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Processing Model ====&lt;br /&gt;
When the link is clicked, the browser keeps the hash in memory to compare it with the it hashes from the downloaded file. Once the file is downloaded, the the computed hash is compared against the expected hash.&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;To be completed: what to do about non-download links, like links to other pages, when they have a hash?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Limitations ==== &lt;br /&gt;
:&#039;&#039;Cases not covered by this solution in relation to the problem description; other problems with this solution, if any.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Implementation ====&lt;br /&gt;
The software industry as a whole is more and more concerned about security implications of the Internet. Security has become another feature of the browser. Something that increase security with minor impact to the user experience will probably be welcome.&lt;br /&gt;
&lt;br /&gt;
A browser could display the following message when in case of hash mismatch:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;File &amp;quot;image.iso&amp;quot; is different from the file linked on page &amp;quot;My Software CD Images&amp;quot;. It is possible that this file has been tampered with and it&#039;d be advisable to not open it. Do you wish to delete the file?&#039;&#039;&amp;lt;br&amp;gt;[Delete File] [Keep in Quarantine]&lt;br /&gt;
&lt;br /&gt;
==== Adoption ==== &lt;br /&gt;
Distributors that already give hashes for their users to verify the files are very likely to add this extra attribute if it simplifies the security checks for their users. The fact that the digests are already available on these pages means that the author of the page is already concerned about security of the transfered file.&lt;br /&gt;
&lt;br /&gt;
=== Hash Microformat ===&lt;br /&gt;
The hash microformat provides a way to associate hash values with links:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;download&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;a rel=&amp;quot;bookmark&amp;quot; href=&amp;quot;...&amp;quot;&amp;gt;Download OpenOffice.org&lt;br /&gt;
     &amp;lt;span class=&amp;quot;checksum md5&amp;quot;&amp;gt;e0d123e5f316bef78bfdf5a008837577&amp;lt;/span&amp;gt;&lt;br /&gt;
     &amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The microformat is better described on the [http://microformats.org/wiki/hash-examples hash-examples] page.&lt;br /&gt;
&lt;br /&gt;
==== Processing Model ====&lt;br /&gt;
When a link is clicked, the browser check if it corresponds to the microformat (&#039;&#039;details to be added&#039;&#039;). If it is the hash value is extracted and, once the file is downloaded, the computed hash for the file is compared against the expected hash. Browsers should keep the initial hash value across redirections, if any. This only applies to files downloaded to the disk.&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;Could the syntax be extended so that fragment identifiers could cohabit with fingerprints?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Limitations ==== &lt;br /&gt;
:&#039;&#039;Cases not covered by this solution in relation to the problem description; other problems with this solution, if any.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Implementation ==== &lt;br /&gt;
The software industry as a whole is more and more concerned about security implications of the Internet. Security has become another feature of the browser. Something that increase security with minor impact to the user experience will probably be welcome.&lt;br /&gt;
&lt;br /&gt;
A browser could display the following message when in case of hash mismatch:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;File &amp;quot;image.iso&amp;quot; is different from the file linked on page &amp;quot;My Software CD Images&amp;quot;. It is possible that this file has been tampered with and it&#039;d be advisable to not open it. Do you wish to delete the file?&#039;&#039;&amp;lt;br&amp;gt;[Delete File] [Keep in Quarantine]&lt;br /&gt;
&lt;br /&gt;
==== Adoption ==== &lt;br /&gt;
Distributors that already give hashes for their users to verify the files are very likely to add this extra attribute if it simplifies the security checks for their users. The fact that the digests are already available on these pages means that the author of the page is already concerned about security of the transfered file.&lt;br /&gt;
&lt;br /&gt;
The microformat markup is heavier that it needs to be. It also force page authors to put the hash visible inside the link, or to apply specific stylesheets to hide it on visual browsers.&lt;br /&gt;
&lt;br /&gt;
=== Link Fingerprint ===&lt;br /&gt;
Append a digest for the file in the fragment identifier of the URL. The browser can then check the validity of the file when it downloads it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://example.com/file#!md5!b3187253c1667fac7d20bb762ad53967&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://www.gerv.net/security/link-fingerprints/ Link Fingerprints article] by Gervase Markham gives more details.&lt;br /&gt;
&lt;br /&gt;
==== Processing Model ====&lt;br /&gt;
When the link is clicked, the browser check if the URL contains a hash. If the URL contains a hash, once the file is downloaded the computed hash is compared against the expected hash. Browsers should keep the initial hash value across redirections, if any. This only applies to files downloaded to the disk.&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;Could the syntax be extended so that fragment identifiers could cohabit with fingerprints?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Limitations ==== &lt;br /&gt;
Work only for downloaded files; fragment identifiers are used in other ways for regular pages and PDF files opened in the browser with a plugin.&lt;br /&gt;
&lt;br /&gt;
==== Implementation ==== &lt;br /&gt;
The software industry as a whole is more and more concerned about security implications of the Internet. Security has become another feature of the browser. Something that increase security with minor impact to the user experience will probably be welcome.&lt;br /&gt;
&lt;br /&gt;
A browser could display the following message when in case of hash mismatch:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;File &amp;quot;image.iso&amp;quot; is different from the file linked on page &amp;quot;My Software CD Images&amp;quot;. It is possible that this file has been tampered with and it&#039;d be advisable to not open it. Do you wish to delete the file?&#039;&#039;&amp;lt;br&amp;gt;[Delete File] [Keep in Quarantine]&lt;br /&gt;
&lt;br /&gt;
==== Adoption ==== &lt;br /&gt;
Distributors that already give hashes for their users to verify the files are very likely to add this extra attribute if it simplifies the security checks for their users. The fact that the digests are already available on these pages means that the author of the page is already concerned about security of the transfered file.&lt;br /&gt;
&lt;br /&gt;
=== Content-MD5 HTTP Header ===&lt;br /&gt;
It has been suggested to use the [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.15 Content-MD5][http://www.usome.com] HTTP header. A tampered file on a hacked server is very likely to get its digest updated accordingly however.&lt;br /&gt;
&lt;br /&gt;
== Mailing List References ==&lt;br /&gt;
* [http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2006-November/007833.html Re: hash attribute] -- Tom Pike, Wed Nov 8 05:21:22 PST 2006&lt;br /&gt;
* [http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2006-November/007903.html Re: hash attribute] -- Ian Hickson, Wed Nov 8 08:28:19 PST 2006&lt;br /&gt;
* [http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2006-November/007857.html Re: hash attribute] -- Gervase Markham, Thu Nov 9 09:23:32 PST 2006&lt;br /&gt;
* [http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2006-November/007903.html Re: hash attribute] -- Michel Fortin, Tue Nov 14 08:53:43 PST 2006&lt;br /&gt;
&lt;br /&gt;
[[Category:Feature Request]]&lt;/div&gt;</summary>
		<author><name>Usome</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=HTML5Lib&amp;diff=2485</id>
		<title>HTML5Lib</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=HTML5Lib&amp;diff=2485"/>
		<updated>2007-08-31T06:18:31Z</updated>

		<summary type="html">&lt;p&gt;Usome: /* Testcases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://code.google.com/p/html5lib/ HTML5Lib] is a project to create both a Python-based and Ruby-based implementations of various parts of the WHATWG spec, in particular, a tokenizer, a parser, and a serializer. It is &#039;&#039;&#039;not&#039;&#039;&#039; an offical WHATWG project, however we plan to use this wiki to document and discuss the library design. The code is avaliable under an open-source MIT license.&lt;br /&gt;
&lt;br /&gt;
== SVN ==&lt;br /&gt;
Please commit often with sort of detailed descriptions of what you did. If you want to make sure you&#039;re not going to redo ask on the [http://groups.google.com/group/html5lib-discuss mailing list].  For questions that could benefit from quick turnaround, talk to people on #whatwg.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
In comments &amp;quot;XXX&amp;quot; indicates something that has yet to be done. Something might be wrong, has not yet been written and other things in that general direction.&lt;br /&gt;
&lt;br /&gt;
In comments &amp;quot;AT&amp;quot; indicates that the comment documents an alternate implementation technique or strategy.&lt;br /&gt;
&lt;br /&gt;
== HTMLTokenizer ==&lt;br /&gt;
&lt;br /&gt;
The tokenizer is controlled by a single HTMLTokenizer class stored in tokenizer.py at the moment. You initialize the HTMLTokenizer with a stream argument that holds an HTMLInputStream. You can iterate over the object created to get tokens back.&lt;br /&gt;
&lt;br /&gt;
Currently tokens are objects, they will become dicts.&lt;br /&gt;
&lt;br /&gt;
=== Interface ===&lt;br /&gt;
&lt;br /&gt;
The parser needs to change the self.contentModelFlag attribute which affects how certain states are handled.&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
* Use of if statements in the states may be suboptimal (but we should time this)&lt;br /&gt;
&lt;br /&gt;
== HTMLParser ==&lt;br /&gt;
&lt;br /&gt;
=== Profiling on web-apps.htm ===&lt;br /&gt;
&lt;br /&gt;
I did some profiling on web-apps.htm which is a rather large document. Based on that I already changed a number of things which speed us up a bit. Below are some things to consider for future revisions:&lt;br /&gt;
&lt;br /&gt;
* utils.MethodDispatcher is invoked way too often. By pre declaring some of it in InBody I managed to decrease the amount of invocatoins by over 24.000, but InBody.__init__ is invoked about 7000 times for web-apps.htm so that amount could be higher. Not sure how to put them somewhere else though. First thing I tried was HTMLParser but references get all messed up then...&lt;br /&gt;
: We should be able to store a single instance of each InsertionMode rather than creating a new one every time the mode switches. Hopefully we have been disiplined enough not to keep any state in those classes so the change should be painless.&lt;br /&gt;
:: That&#039;s an interesting idea. How would that work? [[User:Annevk|Annevk]] 12:49, 25 December 2006 (UTC)&lt;br /&gt;
::: I got an idea on how it might work and it worked! Still about 3863 invocations to utils.MethodDispatcher but it takes 0.000 CPU seconds. I suppose we can decrease that amount even more, but I wonder if it&#039;s worth it. [[User:Annevk|Annevk]] 11:37, 26 December 2006 (UTC)&lt;br /&gt;
&lt;br /&gt;
* 713194 calls to __contains__ in sets.py makes us slow. Takes about 1.0x CPU seconds. &lt;br /&gt;
: I&#039;ve just switched to the built-in sets type. hopefully this will help a bit [[User:Jgraham|Jgraham]] 00:30, 25 December 2006 (UTC)&lt;br /&gt;
:: It did. (Not surprisingly when 700.000 method calls are gone...) [[User:Annevk|Annevk]] 12:49, 25 December 2006 (UTC)&lt;br /&gt;
&lt;br /&gt;
* 440382 calls to char in tokenizer.py is the runner up with 0.8x CPU seconds.&lt;br /&gt;
: This is now the largest time consumer. [[User:Annevk|Annevk]] 12:49, 25 December 2006 (UTC)&lt;br /&gt;
&lt;br /&gt;
* dataState in tokenizer.py with 0.7 CPU seconds is next.&lt;br /&gt;
: This is now at 0.429 CPU seconds. Probably becase the tokenizer switched to dicts instead of custom Token objects. [[User:Annevk|Annevk]]&lt;br /&gt;
&lt;br /&gt;
* __iter__ in tokenizer.py with 0.59x CPU seconds...&lt;br /&gt;
&lt;br /&gt;
* Creation of all node objects in web-apps takes .57x CPU seconds.&lt;br /&gt;
&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
== Testcases ==&lt;br /&gt;
Testcases are under the /tests directory. They require [http://cheeseshop.python.org/pypi/simplejson simplejson]. New code should not be checked in if it regresses previously functional unit tests. Similarly, new tests that don&#039;t pass should not be checked in without both informing others on the [http://groups.google.com/group/html5lib-discuss mailing list] and a concrete plan.  Ideally new features should be accompanied by new unit tests for those features. Documentation of the test format is available at [[Parser_tests]][http://www.usome.com].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Implementations]]&lt;/div&gt;</summary>
		<author><name>Usome</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Main_Page&amp;diff=2479</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Main_Page&amp;diff=2479"/>
		<updated>2007-08-24T10:18:48Z</updated>

		<summary type="html">&lt;p&gt;Usome: /* Communicating with the community */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the WHATWG Wiki!&lt;br /&gt;
&lt;br /&gt;
You can be a part of our community, making proposals for the next version of HTML5. This wiki is made available for you for drafting proposals, for writing essays, for keeping track of HTML-related issues, and so forth. Anyone can create an account and contribute content.&lt;br /&gt;
&lt;br /&gt;
Before you begin, you may wish to read our [[WHATWG Wiki:Contribution Guidelines|contribution guidelines]].&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
The purpose of the WHATWG Wiki is to create a place for WHATWG contributors to post and compile their own proposals and ideas regarding WHATWG specifications. The specifications themselves will not be available for editing via this wiki. However, ideas you post here may find their way into current and future WHATWG specifications.&lt;br /&gt;
&lt;br /&gt;
== Main sections and Quick links ==&lt;br /&gt;
* [[Implementations]]&lt;br /&gt;
* [[What you can do]]&lt;br /&gt;
* [[Differences from HTML4|HTML5 differences from HTML4]]&lt;br /&gt;
* [[HTML vs. XHTML]]&lt;br /&gt;
* [[HTML5 Presentations]]&lt;br /&gt;
* [[Feature Proposals]]&lt;br /&gt;
&lt;br /&gt;
==WHATWG Specifications==&lt;br /&gt;
* [[HTML 5]]&lt;br /&gt;
* [[Web Forms 2.0]]&lt;br /&gt;
* [[Web Controls 1.0]]&lt;br /&gt;
&lt;br /&gt;
==Communicating with the community==&lt;br /&gt;
The WHATWG community has several channels of communication:&lt;br /&gt;
* [http://www.whatwg.org/mailing-list Mailing lists]&lt;br /&gt;
* [http://blog.whatwg.org/ The blog]&lt;br /&gt;
* [http://wiki.whatwg.org/ This wiki]&lt;br /&gt;
* [http://www.usome.com IRC]&lt;br /&gt;
* [http://forums.whatwg.org/ The forum]&lt;/div&gt;</summary>
		<author><name>Usome</name></author>
	</entry>
</feed>