<?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=J9t</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=J9t"/>
	<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/wiki/Special:Contributions/J9t"/>
	<updated>2026-06-14T03:11:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Rationale&amp;diff=10314</id>
		<title>Rationale</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Rationale&amp;diff=10314"/>
		<updated>2019-10-20T19:03:42Z</updated>

		<summary type="html">&lt;p&gt;J9t: Corrected misc issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&lt;br /&gt;
notes of things to add&lt;br /&gt;
1. explanation of &amp;lt;device&amp;gt; &lt;br /&gt;
2. Why the WHATWG version is unversioned and called HTML5...&lt;br /&gt;
3. explain difference between W3C and WHATWG version?&lt;br /&gt;
4. Explain all the different uses of the header, hgroup, .... elements&lt;br /&gt;
6. http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-April/025920.html - add this somewhere.&lt;br /&gt;
7. add header/h1 and such explanation&lt;br /&gt;
8. Better explain Defer/async&lt;br /&gt;
9. skip links??&lt;br /&gt;
10. http://www.mail-archive.com/whatwg@lists.whatwg.org/msg23220.html&lt;br /&gt;
11. Rationale of scoped attribute (see for example http://html5doctor.com/the-scoped-attribute/)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
This rationale document is supplemental to the WHATWG [https://html.spec.whatwg.org//multipage/ HTML Living Standard] specification. It is a work-in-progress.&lt;br /&gt;
&lt;br /&gt;
== General Rationale ==&lt;br /&gt;
&lt;br /&gt;
=== In overall terms, what determines what&amp;amp;rsquo;s in the spec? ===&lt;br /&gt;
&lt;br /&gt;
==== Already-implemented features ====&lt;br /&gt;
In the past, the contents of the spec tended to be determined by browsers&amp;amp;rsquo; &amp;lt;i&amp;gt;de facto&amp;lt;/i&amp;gt; feature set. After all, one of the main purposes of the spec is to describe reality (regardless of what the spec editor, members, and contributors think). Historically, vendors competed with one another by implementing features without regard to any specification. It&amp;amp;rsquo;s a relatively recent phenomenon that vendors compete by their conformance to the spec. That is to say, in the past, browsers tended to dictate what was in the spec, whereas today, it&#039;s the converse.&lt;br /&gt;
&lt;br /&gt;
Thus, the spec must include all already-implemented features. A feature may be moved to the obsolete section if there is consensus that the feature should not be used in new content.&lt;br /&gt;
&lt;br /&gt;
==== Member and contributor feedback ====&lt;br /&gt;
When adding features to the spec, the editor takes into account member and contributor feedback (via the WHATWG mailing list and IRC channel). If the editor believes inclusion of a feature is justified, he will add it to the spec. Ultimately, whether a feature remains in the spec depends on whether or not vendors (at least two) decide to implement the feature.&lt;br /&gt;
&lt;br /&gt;
=== One vendor, one veto === &lt;br /&gt;
Part of the the goal of the WHATWG is to document how web browsers actually handle HTML. As such, browser vendors already have veto power&amp;amp;mdash;by not following the standard. The W3C and WHATWG do not have any enforcement power and can only write what browsers are willing to implement. Not removing features from the HTML standard that at least one browser vendor has stated they are unwilling to implement causes the HTML spec to not accurately document reality.&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/public-html/2009Jul/0257.html -- Re: Codecs for &amp;amp;lt;video&amp;amp;gt; and &amp;amp;lt;audio&amp;amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/www-archive/2009Jul/0075.html --Formal Objection to One vendor, One Veto&amp;lt;/ref&amp;gt; The veto isn&amp;amp;rsquo;t a power that we grant browsers; it&amp;amp;rsquo;s a right that they earn on their own by virtue of having users. The minimum market share for a veto is somewhere around 1%.&amp;lt;ref&amp;gt;http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-June/026897.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Why is everything else around us developing so fast, but the web is so slow to adopt anything?&amp;lt;ref&amp;gt;http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-October/041037.html&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
Because to get something adopted in a browser, you need to do the following (not always in this order):&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Have someone design the feature.&lt;br /&gt;
 &amp;lt;li&amp;gt;Have someone write a specification for it.&lt;br /&gt;
 &amp;lt;li&amp;gt;Have some people write tests for it.&lt;br /&gt;
 &amp;lt;li&amp;gt;Have one browser implement it.&lt;br /&gt;
 &amp;lt;li&amp;gt;Have another browser implement it.&lt;br /&gt;
 &amp;lt;li&amp;gt;Have another browser implement it.&lt;br /&gt;
 &amp;lt;li&amp;gt;Have another browser implement it.&lt;br /&gt;
 &amp;lt;li&amp;gt;Have people document it.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
This is in contrast to &amp;amp;ldquo;everything else,&amp;amp;rdquo; which just needs:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Someone to implement it.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using elements where scripts &amp;amp;ldquo;work&amp;amp;rdquo; ===&lt;br /&gt;
In addition, arguments were made that JavaScript-based implementations of details suffer from problems and limitations. Scripting behavior may be inconsistent across browsers, or even unavailable in some contexts. Accessibility is &amp;quot;bolted on&amp;quot;, allowing more opportunity for author error, even when using libraries. The data model is not exposed in a consistent way in the markup. And matching native appearance and behavior across a range of platforms may be impractical.&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/public-html/2010Jun/att-0659/issue-93-decision.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== It isn&amp;amp;rsquo;t just about web browsers ===&lt;br /&gt;
Web browsers are not the only programs that use HTML. Sometimes elements and features are needed even when browsers won&amp;amp;rsquo;t use them in any meaningful way. Document authoring tools, validators, search engines, screen readers, outliners, researchers, etc. all need and can use more information than a browser can. Furthermore if you provide more information than is currently used by browsers it opens up room for innovation.&lt;br /&gt;
&lt;br /&gt;
=== Experimenting with features ===&lt;br /&gt;
New unknown and untested features are unlikely to get accepted into the WHATWG spec. Browsers and browser extensions (like Google Gears) are expected to first establish use cases and implementation possibilities before the spec is changed. &amp;lt;ref&amp;gt;http://www.mail-archive.com/whatwg@lists.whatwg.org/msg22577.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Versioning the spec ===&lt;br /&gt;
Most authors don&amp;amp;rsquo;t care about whether or not an implementation supports an entire, full specification; they just want to know &amp;amp;ldquo;Can I use this feature in this browser?&amp;amp;rdquo; So saying that all major implementations support much of CSS 2 to a high degree of correctness is useless for knowing if, say, the author can use display: run-in. In other words, the feature tables are what web authors would actually use in real life.&amp;lt;ref&amp;gt;http://www.mail-archive.com/whatwg@lists.whatwg.org/msg23306.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--=== HTML5 the spec vs HTML5 the buzzword ===&lt;br /&gt;
http://www.mail-archive.com/whatwg@lists.whatwg.org/msg23299.html&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
=== Modifying existing semantics ===&lt;br /&gt;
Some elements have different semantics than what HTML users would expect. Semantic markup isn&amp;amp;rsquo;t very useful if most pages use elements in a manner that conflicts with the defined semantics. For example, if a search engine treated &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; as enclosing a term being defined, for the purposes of searching for definitions, it would not find many definitions, and it would misclassify things.&amp;lt;ref&amp;gt;http://lists.whatwg.org/htdig.cgi/help-whatwg.org/2010-October/000668.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What is the purpose of defining elements semantically? ===&lt;br /&gt;
Semantic definitions allow HTML processors, such as Web browsers or search engines, to present and use documents and applications in a wide variety of contexts that the author might not have considered.&amp;lt;ref&amp;gt;https://html.spec.whatwg.org//multipage/elements.html#elements&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Consider a Web page written by an author who only considered desktop computer Web browsers. Because HTML conveys &amp;lt;em&amp;gt;meaning&amp;lt;/em&amp;gt;, rather than presentation, the same page can also be used by a small browser on a mobile phone, without any change to the page. Instead of headings being in large letters as on the desktop, for example, the browser on the mobile phone might use the same size text for the whole the page, but with the headings in bold.&lt;br /&gt;
&lt;br /&gt;
The same page could equally be used by a blind user using a browser based around speech synthesis, which instead of displaying the page on a screen, reads the page to the user, e.g., using headphones. Instead of large text for the headings, the speech browser might use a different volume or a slower voice.&lt;br /&gt;
&lt;br /&gt;
Since the browsers know which parts of the page are the headings, they can create a document outline that the user can use to quickly navigate around the document, using keys for &amp;amp;ldquo;jump to next heading&amp;amp;rdquo; or &amp;amp;ldquo;jump to previous heading&amp;amp;rdquo;. Such features are especially common with speech browsers, where users would otherwise find quickly navigating a page quite difficult.&lt;br /&gt;
&lt;br /&gt;
Even beyond browsers, software can make use of this information. Search engines can use the headings to more effectively index a page, or to provide quick links to subsections of the page from their results. Tools can use the headings to create a table of contents (that is in fact how the table of contents of the WHATWG HTML specification is generated).&lt;br /&gt;
&lt;br /&gt;
This example has focused on headings, but the same principle applies to all of the semantics in HTML.&lt;br /&gt;
&lt;br /&gt;
=== Why is it important to stick to the semantics as defined in the spec? ===&lt;br /&gt;
Not adhering to the spec&amp;amp;rsquo;s semantics prevents software that assumes and relies on said semantics from correctly processing the document.&lt;br /&gt;
&lt;br /&gt;
For example, the following document is non-conforming, despite being syntactically correct:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;!DOCTYPE HTML&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;html lang=&amp;quot;en-GB&amp;quot;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;head&amp;amp;gt; &amp;amp;lt;title&amp;amp;gt; Demonstration &amp;amp;lt;/title&amp;amp;gt; &amp;amp;lt;/head&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;body&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;table&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;tr&amp;amp;gt; &amp;amp;lt;td&amp;amp;gt; My favourite animal is the cat. &amp;amp;lt;/td&amp;amp;gt; &amp;amp;lt;/tr&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;tr&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;td&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;a href=&amp;quot;http://example.org/~ernest/&amp;quot;&amp;amp;gt;&amp;amp;lt;cite&amp;amp;gt;Ernest&amp;amp;lt;/cite&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;,&lt;br /&gt;
     in an essay from 1992&lt;br /&gt;
    &amp;amp;lt;/td&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/tr&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;/table&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/body&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/html&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;hellip;because the data placed in the cells is clearly not tabular data (and the &amp;lt;code&amp;gt;cite&amp;lt;/code&amp;gt; element is misused). This would make software that relies on these semantics fail. For example, a speech browser that allowed a blind user to navigate tables in the document would report the quote above as a table, confusing the user; similarly, a tool that extracted titles of works from pages would extract &amp;amp;ldquo;Ernest&amp;amp;rdquo; as the title of a work, even though it&amp;amp;rsquo;s actually a person&amp;amp;rsquo;s name, not a title.&lt;br /&gt;
&lt;br /&gt;
A corrected version of this document might be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;!DOCTYPE HTML&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;html lang=&amp;quot;en-GB&amp;quot;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;head&amp;amp;gt; &amp;amp;lt;title&amp;amp;gt; Demonstration &amp;amp;lt;/title&amp;amp;gt; &amp;amp;lt;/head&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;body&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;blockquote&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;p&amp;amp;gt; My favourite animal is the cat. &amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;/blockquote&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;p&amp;amp;gt;&lt;br /&gt;
   —&amp;amp;lt;a href=&amp;quot;http://example.org/~ernest/&amp;quot;&amp;amp;gt;Ernest&amp;amp;lt;/a&amp;amp;gt;,&lt;br /&gt;
   in an essay from 1992&lt;br /&gt;
  &amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/body&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/html&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Specific Elements ==&lt;br /&gt;
&lt;br /&gt;
=== The DOCTYPE (Document Type Declaration) ===&lt;br /&gt;
Because HTML has moved to an unversioned model, the &amp;lt;code&amp;gt;DOCTYPE&amp;lt;/code&amp;gt; does not a have version number. The inclusion of a document type declaration is necessary merely for legacy browsers that will operate in quirks mode (a non-spec compliant rendering mode) if a &amp;lt;code&amp;gt;DOCTYPE&amp;lt;/code&amp;gt; is absent.&lt;br /&gt;
&lt;br /&gt;
=== Document metadata ===&lt;br /&gt;
&lt;br /&gt;
==== The &amp;lt;code&amp;gt;charset&amp;lt;/code&amp;gt; attribute on the &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; element in XML documents ====&lt;br /&gt;
The &amp;lt;code&amp;gt;charset&amp;lt;/code&amp;gt; attribute on the &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; element has no effect in XML documents; it is only allowed in order to facilitate migration to and from XHTML.&amp;lt;ref&amp;gt;https://html.spec.whatwg.org//multipage/semantics.html#the-meta-element&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inclusion of the &amp;lt;code&amp;gt;application-name&amp;lt;/code&amp;gt; metadata &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; value ====&lt;br /&gt;
User agents may want to use the Web application name in UI in preference to the page&amp;amp;rsquo;s &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;, as the title might include status messages and the like relevant to the status of the page at a particular moment in time instead of just being the name of the application.&amp;lt;ref&amp;gt;https://html.spec.whatwg.org//multipage/semantics.html#the-meta-element&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== On the continued inclusion of the &amp;lt;code&amp;gt;keyword&amp;lt;/code&amp;gt; metadata &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; value ====&lt;br /&gt;
Considering that the &amp;lt;code&amp;gt;keyword&amp;lt;/code&amp;gt; value has historically been used unreliably and even misleadingly as a way to spam search engine results (i.e., to garner higher search engine rankings), why is this feature still included in the spec? Because a content management system, for example, can use the keyword information of pages within the system to populate the index of a site-specific search engine. In short, keywords have use beyond the large-scale content aggregators (e.g., Google) that pervade the Web.&lt;br /&gt;
&lt;br /&gt;
=== Sections ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;hgroup&amp;lt;/code&amp;gt; and other heading elements ====&lt;br /&gt;
The point of &amp;lt;code&amp;gt;hgroup&amp;lt;/code&amp;gt; is to hide the subtitle from the outlining algorithm.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;header&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;footer&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&amp;lt;blockquote&amp;gt;The primary purpose of these elements is merely to help the author write self-explanatory markup that is easy to maintain and style; they are not intended to impose specific structures on authors.&amp;lt;ref&amp;gt;http://developers.whatwg.org/sections.html#the-footer-element&amp;lt;/ref&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Grouping content ===&lt;br /&gt;
&lt;br /&gt;
==== The &amp;lt;code&amp;gt;blockquote&amp;lt;/code&amp;gt; element ====&lt;br /&gt;
&lt;br /&gt;
===== Why is it non-conforming to place attributions and inline citations inside the &amp;lt;code&amp;gt;blockquote&amp;lt;/code&amp;gt; element? =====&lt;br /&gt;
Because the specification does not consider attributions and inline citations to be part of a block quote proper.&amp;lt;ref&amp;gt;http://developers.whatwg.org/grouping-content.html#the-blockquote-element&amp;lt;/ref&amp;gt; In other words, the &amp;lt;code&amp;gt;blockquote&amp;lt;/code&amp;gt; element represents only the quote itself.&lt;br /&gt;
&lt;br /&gt;
=== Text-level semantics ===&lt;br /&gt;
&lt;br /&gt;
=== Embedded content ===&lt;br /&gt;
&lt;br /&gt;
==== On the status of &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt; ====&lt;br /&gt;
The &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt; element is treated as an alternate (but invalid) name for &amp;lt;code&amp;gt;img&amp;lt;/code&amp;gt;. This is because some sites (around 0.2%&amp;lt;ref&amp;gt;Email from Ian Hickson; comment in spec source&amp;lt;/ref&amp;gt;) make this mistake. It is already treated as an image by most major browsers.&lt;br /&gt;
&lt;br /&gt;
==== The &amp;lt;code&amp;gt;img&amp;lt;/code&amp;gt; element and alternate (&amp;lt;code&amp;gt;alt&amp;lt;/code&amp;gt;) text ====&lt;br /&gt;
On certain types of pages adding alternate text (with the &amp;lt;code&amp;gt;alt&amp;lt;/code&amp;gt; attribute) is impossible (e.g., sites where the user can upload but with no mechanism to supply a description). Because of this, the &amp;lt;code&amp;gt;alt&amp;lt;/code&amp;gt; attribute is optional. &amp;lt;ref&amp;gt;http://www.paciellogroup.com/resources/articles/altinhtml5.html&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;http://juicystudio.com/article/requiring-alt-attribute-html5.php&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/public-html/2007Jun/0393.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
A longdesc attribute is not needed &amp;lt;ref&amp;gt;http://juicystudio.com/article/html5-image-element-no-alt.php&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Forms ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The text area defaults to soft wrapping of the text area. The attribute @wrap can have one of the following values: soft, hard, or off.&amp;lt;ref&amp;gt;https://html.spec.whatwg.org//#the-textarea-element-0&amp;lt;/ref&amp;gt;. &amp;quot;off&amp;quot; is considered a non-conforming value because it appears to have no purpose other than a visual presentational effect. &amp;lt;ref&amp;gt;http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022022.html&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;http://www.mail-archive.com/whatwg@lists.whatwg.org/msg22660.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;meter&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;progress&amp;lt;/code&amp;gt; (are not the same thing) ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;meter&amp;lt;/code&amp;gt; is not just a special case of &amp;lt;code&amp;gt;progress&amp;lt;/code&amp;gt;.  The &amp;lt;code&amp;gt;meter&amp;lt;/code&amp;gt; element represents a scalar measurement within a known range, such as storage quota usage, a relative popularity rating or relevance indicator.  The control allows for the indication of high and low ranges, or minimum, maximum and optimal levels.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;progress&amp;lt;/code&amp;gt; element, on the other hand, represents the completion progress of a task.  This could be a real time indicator for background processing task (e.g. using Web Workers or a file upload).  &amp;lt;code&amp;gt;progress&amp;lt;/code&amp;gt; elements can also be in the indeterminate state, indicating that something is in progress, but its completion progress is unknown.&amp;lt;ref&amp;gt;http://html5doctor.com/your-questions-answered-11/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [http://www.mail-archive.com/whatwg@lists.whatwg.org/msg01308.html Re: &amp;amp;lt;progress&amp;amp;gt; draft] for details.&lt;br /&gt;
&lt;br /&gt;
=== Interactive elements ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;details&amp;lt;/code&amp;gt; element ====&lt;br /&gt;
The &amp;lt;code&amp;gt;details&amp;lt;/code&amp;gt; element is needed to provide an accessible way of reflecting a&lt;br /&gt;
common application widget in HTML-based applications without requiring authors&lt;br /&gt;
to use extensive scripting, &amp;lt;abbr title=Accessible Rich Interactive Applications&amp;gt;ARIA&amp;lt;/abbr&amp;gt;, and platform-specific CSS to get the same&lt;br /&gt;
effect.&amp;lt;ref&amp;gt;http://www.w3.org/Bugs/Public/show_bug.cgi?id=8379#c13&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;http://www.w3.org/html/wg/wiki/ChangeProposals/removedetails&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== HTML parsing ==&lt;br /&gt;
&lt;br /&gt;
=== script element ===&lt;br /&gt;
&lt;br /&gt;
Why the [https://html.spec.whatwg.org//multipage/scripting-1.html#restrictions-for-contents-of-script-elements restrictions for contents of script elements]? Why the [https://html.spec.whatwg.org//multipage/tokenization.html#script-data-double-escaped-dash-dash-state complicated parsing rules for script elements]?&lt;br /&gt;
&lt;br /&gt;
See http://lists.w3.org/Archives/Public/public-html-comments/2010Mar/0017.html&lt;br /&gt;
&lt;br /&gt;
==== @defer and @async ====&lt;br /&gt;
async tells the browsers to run the script with its following content at the &#039;&#039;&#039;same&#039;&#039;&#039; time(namely, asynchronously).&lt;br /&gt;
&lt;br /&gt;
defer tells the browsers to run the script &#039;&#039;&#039;later&#039;&#039;&#039;, and to run the following content first(the browsers will run the script until the page is ready).&amp;lt;ref&amp;gt;http://www.mail-archive.com/whatwg@lists.whatwg.org/msg22436.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Quirks mode ===&lt;br /&gt;
The HTML parser has [https://html.spec.whatwg.org//multipage/tokenization.html#parsing-main-inbody the following] behavior difference in quirks mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;dl&amp;gt;&amp;lt;dt&amp;gt;A start tag whose tag name is &amp;quot;table&amp;quot;&lt;br /&gt;
&amp;lt;dd&amp;gt;If the Document is not set to quirks mode, and the stack of open elements has a p element in scope, then act as if an end tag with the tag name &amp;quot;p&amp;quot; had been seen.&amp;lt;/dl&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why? See http://hsivonen.iki.fi/last-html-quirk/&lt;br /&gt;
&lt;br /&gt;
=== Ignored white space before head ===&lt;br /&gt;
White space before the &amp;lt;code&amp;gt;&amp;amp;lt;head&amp;gt;&amp;lt;/code&amp;gt; tag is ignored. The main reason is that, given the markup&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
  &amp;lt;title&amp;gt;Sample page&amp;lt;/title&amp;gt;&lt;br /&gt;
...,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
some people expect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
document.documentElement.firstChild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to return the &amp;lt;code&amp;gt;head&amp;lt;/code&amp;gt; element.&amp;lt;ref&amp;gt;&amp;lt;cite&amp;gt;[http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-March/014148.html &amp;amp;#91;whatwg&amp;amp;#93; several messages about the tree construction stage of HTML parsing]&amp;lt;/cite&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- needs to be confirmed --&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Why all input elements are candidates for Constraint validation ===&lt;br /&gt;
Some elements have the API but are barred because it makes it  &lt;br /&gt;
easier to loop through form.elements and do the validation stuff without  &lt;br /&gt;
checking if the validation stuff is available on the element. (Same reason  &lt;br /&gt;
&amp;lt;textarea&amp;gt; has .type.)&lt;br /&gt;
&amp;lt;ref&amp;gt;http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-July/027195.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rejected proposals ==&lt;br /&gt;
A &amp;amp;ldquo;&amp;lt;code&amp;gt;&amp;amp;lt;comment&amp;amp;gt;&amp;lt;/code&amp;gt;&amp;amp;rdquo; element for marking up user comments (i.e., user compositions in response to newspaper or magazine articles, blog entries, discussion topics, status updates, images, videos, etc.) ===&lt;br /&gt;
&lt;br /&gt;
==== Why isn&amp;amp;rsquo;t there an element for user comments? (e.g., &amp;lt;code&amp;gt;&amp;amp;lt;comment&amp;amp;gt;&amp;lt;/code&amp;gt;) ====&lt;br /&gt;
There is: &amp;lt;code&amp;gt;article&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== But comments are not articles ====&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it is basically impossible for a single word or letter to stand for a careful description of an element&amp;amp;rsquo;s semantics, and the element name &amp;amp;ldquo;article&amp;amp;rdquo; isn&amp;amp;rsquo;t intended to carry the same meaning as its corresponding dictionary entry or any colloquial understanding of the term.&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jan/0226.html&amp;lt;/ref&amp;gt; The term &amp;amp;ldquo;article&amp;amp;rdquo; is defined broadly in HTML to include any complete or self-contained composition. This includes:&lt;br /&gt;
* forum posts&lt;br /&gt;
* newspaper articles&lt;br /&gt;
* magazine articles&lt;br /&gt;
* books&lt;br /&gt;
* blog posts&lt;br /&gt;
* comment on a forum post&lt;br /&gt;
* comment on a newspaper article&lt;br /&gt;
* comment on a magazine article&lt;br /&gt;
* comment on a blog post&lt;br /&gt;
* an embeddable interactive widget&lt;br /&gt;
* a post with a photograph on a social network&lt;br /&gt;
* a comment on a photograph on a social network&lt;br /&gt;
* a specification&lt;br /&gt;
* an e-mail&lt;br /&gt;
* a reply to an e-mail&lt;br /&gt;
Comments are considered articles&amp;amp;mdash;in the HTML sense&amp;amp;mdash;because they are &amp;lt;em&amp;gt;complete&amp;lt;/em&amp;gt; compositions unto themselves i.e., they are not part of the piece of writing that they are commenting on (though they are obviously &amp;lt;em&amp;gt;related&amp;lt;/em&amp;gt; to what they are commenting on, for example, &amp;amp;ldquo;is in response to.&amp;amp;rdquo; This relationship is demonstrated by nesting the comment article inside the article it&amp;amp;rsquo;s responding to).&lt;br /&gt;
&lt;br /&gt;
==== Surely the comment &amp;amp;ldquo;LOL&amp;amp;rdquo; is not an article? ====&lt;br /&gt;
According to the HTML spec, it is. It&amp;amp;rsquo;s true that many comments need a context to be appreciated or fully understood, but then again many (most?, all?) newspaper or magazine articles need some greater context to be fully understood as well. The point is that the definition of &amp;lt;code&amp;gt;article&amp;lt;/code&amp;gt; does not require a piece of writing to be fully intelligible on its own. All that matters is that the comment is separate from the thing that it&amp;amp;rsquo;s commenting on. It&amp;amp;rsquo;s that separateness that makes it an article (in the HTML sense).&lt;br /&gt;
&lt;br /&gt;
==== Robots and plugins can extract comments from web pages more easily if they have their own element. Comments can then be more easily syndicated, displayed, hidden, styled, etc. ====&lt;br /&gt;
There&amp;amp;rsquo;s no compelling argument that a dedicated &amp;lt;code&amp;gt;comment&amp;lt;/code&amp;gt; element would make this meaningfully easier than nested &amp;lt;code&amp;gt;article&amp;lt;/code&amp;gt; elements.&lt;br /&gt;
&lt;br /&gt;
==== Comments can sometimes appear in a different region of the page than the composition they are referencing. By defining comments as nested articles, the spec is artificially forcing comments to be contained within the markup of the composition they are referencing. ====&lt;br /&gt;
No evidence has been put forth to suggest that this is a significant authorship issue.&lt;br /&gt;
&lt;br /&gt;
==== Why should the spec suggest any one specific method for marking up comments? ====&lt;br /&gt;
If it is clear that an &amp;lt;code&amp;gt;article&amp;lt;/code&amp;gt; within an &amp;lt;code&amp;gt;article&amp;lt;/code&amp;gt; represents a comment, one can easily:&lt;br /&gt;
* programmatically find comments in HTML&lt;br /&gt;
* write interoperable style sheets for comments, using the selector &amp;lt;code&amp;gt;article &amp;amp;gt; article&amp;lt;/code&amp;gt;&lt;br /&gt;
* use HTML fragments in a document store for content management (e.g., blog software with a git backend)&lt;br /&gt;
Without having one interoperable way of expressing comments, all that becomes a lot harder.&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Feb/0129.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also see [[Rationale#Why is it important to stick to the semantics as defined in the spec?|Why is it important to stick to the semantics as defined in the spec?]] on this page.&lt;br /&gt;
&lt;br /&gt;
=== Why isn&amp;amp;rsquo;t there a dedicated element for advertisements? (e.g., &amp;lt;code&amp;gt;&amp;amp;lt;ad&amp;amp;gt;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;amp;lt;advert&amp;amp;gt;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;amp;lt;banner&amp;amp;gt;&amp;lt;/code&amp;gt;, or whatever) ===&lt;br /&gt;
Because it would give users a relatively easy method for hiding or otherwise disabling ads, in which case the element would very likely end up not being used by content authors&amp;lt;ref&amp;gt;http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-February/013939.html&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-September/033086.html&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; How should advertisements be marked up?&lt;br /&gt;
   &lt;br /&gt;
It&#039;s worth considering that an &amp;lt;advert&amp;gt; element (or &amp;lt;banner&amp;gt; or whatever &lt;br /&gt;
you decide to call it) would just cause style rules like advert &lt;br /&gt;
{display:none;} to become widespread (e.g. by integration into Adblock &lt;br /&gt;
and equivalent). Therefore I can&#039;t see this type of markup being used by &lt;br /&gt;
most advertisers.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; I&#039;ve joined this list to put forward the argument that there should be&lt;br /&gt;
&amp;gt; elements for &amp;lt;comment&amp;gt; and &amp;lt;ad&amp;gt; included in the HTML5 spec.&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&amp;gt; These are both extremely common features of many web pages; I would say&lt;br /&gt;
&amp;gt; at least as common as &amp;quot;article&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;ad&amp;gt;, there&#039;s the obvious potential usage of setting&lt;br /&gt;
&lt;br /&gt;
ad { display: none !important }&lt;br /&gt;
&lt;br /&gt;
in a user style sheet. I don&#039;t think this possibility would make &amp;lt;ad&amp;gt;&lt;br /&gt;
popular among authors.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ian Hickson recommends using the &amp;lt;code&amp;gt;aside&amp;lt;/code&amp;gt; element instead&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jan/0226.html&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; I&#039;ve joined this list to put forward the argument that there should be &lt;br /&gt;
&amp;gt; elements for &amp;lt;comment&amp;gt; and &amp;lt;ad&amp;gt; included in the HTML5 spec.&lt;br /&gt;
&lt;br /&gt;
For advertisments, I do not think it makes sense to add an element. In &lt;br /&gt;
practice, it would likely not end up being used, since doing so would make &lt;br /&gt;
it too easy to hide advertisments.&lt;br /&gt;
&lt;br /&gt;
However, the &amp;lt;aside&amp;gt; element is a close fit for the semantic, so I would &lt;br /&gt;
recommend using that.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Why isn&amp;amp;rsquo;t there a grouping-type element for description lists to represent individual name-value groups (e.g., a &amp;amp;ldquo;&amp;lt;code&amp;gt;dli&amp;lt;/code&amp;gt;&amp;amp;rdquo; element)? It would make styling as well as adding microdata to individual groups much easier.&amp;lt;ref&amp;gt;http://lists.whatwg.org/htdig.cgi/help-whatwg.org/2013-October/001245.html&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
There is; it is now allowed to use &amp;lt;code&amp;gt;&amp;amp;lt;div&amp;gt;&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;lt;dl&amp;gt;&amp;lt;/code&amp;gt;. See https://github.com/whatwg/html/issues/1937&lt;br /&gt;
&lt;br /&gt;
=== Why isn&amp;amp;rsquo;t there a &amp;lt;code&amp;gt;sandbox&amp;lt;/code&amp;gt; attribute on the &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt; element? ===&lt;br /&gt;
HTML is the wrong level for disabling scripts or other features. This is the kind of thing should be done at the HTTP layer.&amp;lt;ref&amp;gt;http://www.w3.org/Bugs/Public/show_bug.cgi?id=8849&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://wiki.mozilla.org/Security/CSP&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Feature queries ===&lt;br /&gt;
Various proposals have come up with the idea of being able to determine if a certain feature is available.&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/www-style/2009Dec/0130.html&amp;lt;/ref&amp;gt; These fail for a variety of reasons:&lt;br /&gt;
Part of the problem is that browser vendors will be economical with the truth.  Marketing people always have an over-optimistic view of the compliance of their product, and will always give themselves the benefit of the doubt in borderline cases.  Also, changing the compliance statement, to remove false claims that are exposed, is likely to a very low priority for the developers.&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/www-style/2010Jul/0097.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
With regard to CSS feature compliance: Remember that CSS&lt;br /&gt;
provides hints and implementations don&#039;t have to accept those hints, and&lt;br /&gt;
hardware may sometimes prevent their being implemented.&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/www-style/2003Nov/0000.html&amp;lt;/ref&amp;gt; &lt;br /&gt;
Some other reasons can be found in the footnotes.&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/www-style/2003Oct/0074.html&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;http://lists.w3.org/Archives/Public/www-style/2004Mar/0282.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Why aren&amp;amp;rsquo;t authors allowed to make custom HTML elements? ===&lt;br /&gt;
&lt;br /&gt;
It is now allowed, see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements&lt;br /&gt;
&lt;br /&gt;
Be aware however that using custom elements when standard elements could have been used make it impossible for search engines, developers, and browsers to understand the semantics of a page.&amp;lt;ref&amp;gt;http://html5doctor.com/your-questions-13/?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+html5doctor+%28HTML5doctor%29&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== secure key-value data stores ===&lt;br /&gt;
[http://www.nczonline.net/blog/securestore-proposal/ A proposal for secure key-value stores for localstorage]&amp;lt;ref&amp;gt;http://www.mail-archive.com/whatwg@lists.whatwg.org/msg20754.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other Pages ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.w3.org/TR/html-design-principles/ HTML Design Principles]&lt;br /&gt;
* [[Why no namespaces]]&lt;br /&gt;
* [[Why no script implements]]&lt;br /&gt;
* [[Why not reuse legend|Why not reuse legend or another &#039;&#039;mini-header&#039;&#039; element.]]&lt;br /&gt;
* [[XHTML2 versus HTML5]]&lt;br /&gt;
* [http://lists.w3.org/Archives/Public/public-html/2008Aug/0300.html &amp;amp;lt;meta http-equiv=content-language&amp;gt; ]&lt;br /&gt;
* [http://www.w3.org/html/wg/wiki/RationalesGathering earlier page started with the same purpose.]&lt;br /&gt;
* [http://www.w3.org/html/wg/wiki/ChangeProposals/KeepNewElements rationale for some new HTML5 elements]&lt;br /&gt;
* [http://wiki.whatwg.org/wiki/FAQ WHATWG FAQ]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>J9t</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:J9t&amp;diff=10313</id>
		<title>User:J9t</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:J9t&amp;diff=10313"/>
		<updated>2019-10-20T18:54:27Z</updated>

		<summary type="html">&lt;p&gt;J9t: Init&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I’m Jens Oliver Meiert, a web developer and author.&lt;/div&gt;</summary>
		<author><name>J9t</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=HTML_vs._XHTML&amp;diff=2126</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=2126"/>
		<updated>2007-03-06T22:25:39Z</updated>

		<summary type="html">&lt;p&gt;J9t: German translation available: Added link&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;).&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; 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;
* Elements with optional tags are implied in certain conditions.&lt;br /&gt;
* In HTML, &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;style&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; elements with tags occurring in the body are moved inserted 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 may be used insted. The &amp;lt;code&amp;gt;http-equiv&amp;lt;/code&amp;gt; attribute on the &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; element 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;
=== MIME Type ===&lt;br /&gt;
&lt;br /&gt;
Both HTML 4.01 and HTML 5 use &amp;lt;code&amp;gt;text/html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;Content-Type: text/html; charset=UTF-8&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parsing HTML ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* HTML 2.0 to HTML 4.01 were formally based on SGML, but browsers did not implement SGML parsers. [http://www.w3.org/TR/html4/conform.html#h-4.2 4.2 SGML] and  [http://www.w3.org/TR/html4/appendix/notes.html#h-B.3 B.3 SGML implementation notes], HTML 4.01. This is a non-normative section of HTML 4.01 specification. And it already makes the difference between HTML user agents and SGML user agents.&lt;br /&gt;
* HTML 5 is defines its own parsing requirements based on the way browsers actually handle HTML.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&lt;br /&gt;
=== Markup ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.w3.org/TR/html4/index/elements.html List of HTML 4.01 elements]&lt;br /&gt;
* [http://www.w3.org/TR/html4/index/attributes.html List of HTML 4.01 attributes]&lt;br /&gt;
* [http://simon.html5.org/html5-elements HTML5 Elements and Attributes]&lt;br /&gt;
&lt;br /&gt;
==== Obsolete Attributes ====&lt;br /&gt;
&lt;br /&gt;
Some attributes that were defined in HTML4 are not included in HTML5. Here&#039;s a current list (subject to change, see the spec):&lt;br /&gt;
&lt;br /&gt;
* html@version&lt;br /&gt;
* head@profile&lt;br /&gt;
* a@rev, link@rev&lt;br /&gt;
* a@target, area@target, base@target, form@target (is mentioned in WF2...), link@target&lt;br /&gt;
* a@charset, link@charset, script@charset&lt;br /&gt;
* table@summary&lt;br /&gt;
* td@headers, th@headers&lt;br /&gt;
* td@axis, th@axis&lt;br /&gt;
* param@valuetype&lt;br /&gt;
* object@standby&lt;br /&gt;
* meta@scheme&lt;br /&gt;
* object@archive&lt;br /&gt;
&lt;br /&gt;
In addition, HTML5 has none of the presentational attributes that were in HTML4 (including those on &amp;amp;lt;table&amp;gt;). Any attributes defined on &#039;&#039;elements&#039;&#039; that are not in HTML5 are (obviously) also not in HTML5.&lt;br /&gt;
&lt;br /&gt;
==== Obsolete Elements ====&lt;br /&gt;
&lt;br /&gt;
The following elements were present in HTML4 but are not defined in HTML5:&lt;br /&gt;
&lt;br /&gt;
* acronym (use &amp;lt;abbr&amp;gt; instead)&lt;br /&gt;
* applet (use &amp;lt;object&amp;gt; instead)&lt;br /&gt;
* basefont&lt;br /&gt;
* big&lt;br /&gt;
* center&lt;br /&gt;
* dir&lt;br /&gt;
* font&lt;br /&gt;
* frame&lt;br /&gt;
* frameset&lt;br /&gt;
* isindex&lt;br /&gt;
* noframes&lt;br /&gt;
* noscript (only in XHTML)&lt;br /&gt;
* s&lt;br /&gt;
* strike&lt;br /&gt;
* tt&lt;br /&gt;
* u&lt;br /&gt;
&lt;br /&gt;
=== Character Encoding ===&lt;br /&gt;
&lt;br /&gt;
The character encoding can be declared using the meta element, but the syntax of the meta element has changed.  In HTML 4.01 and earlier, the meta element was:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=UTF-8&amp;quot;&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
In HTML5, the syntax was simplified to remove the unnecessary markup, yet still remain compatible with the encoding detection implemented in most existing browsers.&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;meta charset=&amp;quot;UTF-8&amp;quot;&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== HTML 4 Algorithm ====&lt;br /&gt;
&lt;br /&gt;
Source [http://www.w3.org/TR/html4/charset.html#h-5.2.2 5.2.2 Specifying the character encoding], HTML 4.01 Specification.&lt;br /&gt;
&lt;br /&gt;
# An HTTP &amp;quot;charset&amp;quot; parameter in a &amp;quot;Content-Type&amp;quot; field.&lt;br /&gt;
# A META declaration with &amp;quot;http-equiv&amp;quot; set to &amp;quot;Content-Type&amp;quot; and a value set for &amp;quot;charset&amp;quot;.&lt;br /&gt;
# The charset attribute set on an element that designates an external resource.&lt;br /&gt;
&lt;br /&gt;
==== HTML 5 Algorithm ====&lt;br /&gt;
&lt;br /&gt;
The exact algorithm that browsers must follow in order to [http://www.whatwg.org/specs/web-apps/current-work/#the-input0 determine the character encoding] is specified in HTML 5.  The basic algorithm works as follows:&lt;br /&gt;
&lt;br /&gt;
# If the transport layer specifies an encoding, use that, and abort these steps. (e.g. The HTTP Content-Type header).&lt;br /&gt;
# Read the first 512 bytes of the file, or at least as much as possible if less than that.&lt;br /&gt;
# If the file starts with a UTF-8, UTF-16 or UTF-32 BOM, then use that and abort these steps.&lt;br /&gt;
# Otherwise use the special algorithm to search the first 512 bytes for a meta element that declares the encoding.  The algorithm is relatively lenient in what it will detect, though since it doesn&#039;t use the normal parsing algorithm, there are some restrictions.&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;]&lt;/div&gt;</summary>
		<author><name>J9t</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=HTML_vs._XHTML&amp;diff=2104</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=2104"/>
		<updated>2007-02-12T18:57:45Z</updated>

		<summary type="html">&lt;p&gt;J9t: German translation announcement&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;).&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; 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;
* Elements with optional tags are implied in certain conditions.&lt;br /&gt;
* In HTML, &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;style&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; elements with tags occurring in the body are moved inserted 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 may be used insted. The &amp;lt;code&amp;gt;http-equiv&amp;lt;/code&amp;gt; attribute on the &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; element 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;
=== MIME Type ===&lt;br /&gt;
&lt;br /&gt;
Both HTML 4.01 and HTML 5 use &amp;lt;code&amp;gt;text/html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;Content-Type: text/html; charset=UTF-8&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parsing HTML ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* HTML 2.0 to HTML 4.01 were formally based on SGML, but browsers did not implement SGML parsers. [http://www.w3.org/TR/html4/conform.html#h-4.2 4.2 SGML] and  [http://www.w3.org/TR/html4/appendix/notes.html#h-B.3 B.3 SGML implementation notes], HTML 4.01. This is a non-normative section of HTML 4.01 specification. And it already makes the difference between HTML user agents and SGML user agents.&lt;br /&gt;
* HTML 5 is defines its own parsing requirements based on the way browsers actually handle HTML.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&lt;br /&gt;
=== Markup ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.w3.org/TR/html4/index/elements.html List of HTML 4.01 elements]&lt;br /&gt;
* [http://www.w3.org/TR/html4/index/attributes.html List of HTML 4.01 attributes]&lt;br /&gt;
* No list (elements and attributes) yet for Web Apps 1.0&lt;br /&gt;
&lt;br /&gt;
==== Obsolete Attributes ====&lt;br /&gt;
&lt;br /&gt;
Some attributes that were defined in HTML4 are not included in HTML5. Here&#039;s a current list (subject to change, see the spec):&lt;br /&gt;
&lt;br /&gt;
* html@version&lt;br /&gt;
* head@profile&lt;br /&gt;
* a@rev, link@rev&lt;br /&gt;
* a@target, area@target, base@target, form@target (is mentioned in WF2...), link@target&lt;br /&gt;
* a@charset, link@charset, script@charset&lt;br /&gt;
* table@summary&lt;br /&gt;
* td@headers, th@headers&lt;br /&gt;
* td@axis, th@axis&lt;br /&gt;
* param@valuetype&lt;br /&gt;
* object@standby&lt;br /&gt;
* meta@scheme&lt;br /&gt;
* object@archive&lt;br /&gt;
&lt;br /&gt;
In addition, HTML5 has none of the presentational attributes that were in HTML4 (including those on &amp;amp;lt;table&amp;gt;). Any attributes defined on &#039;&#039;elements&#039;&#039; that are not in HTML5 are (obviously) also not in HTML5.&lt;br /&gt;
&lt;br /&gt;
==== Obsolete Elements ====&lt;br /&gt;
&lt;br /&gt;
The following elements were present in HTML4 but are not defined in HTML5:&lt;br /&gt;
&lt;br /&gt;
* acronym (use &amp;lt;abbr&amp;gt; instead)&lt;br /&gt;
* applet (use &amp;lt;object&amp;gt; instead)&lt;br /&gt;
* basefont&lt;br /&gt;
* big&lt;br /&gt;
* center&lt;br /&gt;
* dir&lt;br /&gt;
* font&lt;br /&gt;
* frame&lt;br /&gt;
* frameset&lt;br /&gt;
* isindex&lt;br /&gt;
* noframes&lt;br /&gt;
* noscript (only in XHTML)&lt;br /&gt;
* s&lt;br /&gt;
* strike&lt;br /&gt;
* tt&lt;br /&gt;
* u&lt;br /&gt;
&lt;br /&gt;
=== Character Encoding ===&lt;br /&gt;
&lt;br /&gt;
==== HTML 4 Algorithm ====&lt;br /&gt;
&lt;br /&gt;
Source [http://www.w3.org/TR/html4/charset.html#h-5.2.2 5.2.2 Specifying the character encoding], HTML 4.01 Specification.&lt;br /&gt;
&lt;br /&gt;
# An HTTP &amp;quot;charset&amp;quot; parameter in a &amp;quot;Content-Type&amp;quot; field.&lt;br /&gt;
# A META declaration with &amp;quot;http-equiv&amp;quot; set to &amp;quot;Content-Type&amp;quot; and a value set for &amp;quot;charset&amp;quot;.&lt;br /&gt;
# The charset attribute set on an element that designates an external resource.&lt;br /&gt;
&lt;br /&gt;
==== HTML 5 Algorithm ====&lt;br /&gt;
&lt;br /&gt;
This is currently undefined in the spec.  See [[Character Encoding Detection]] for documentation.&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;
* German translation: In progress ([http://meiert.com/en/ Jens Meiert])&lt;/div&gt;</summary>
		<author><name>J9t</name></author>
	</entry>
</feed>