<?xml?> Declaration Attributes

version The version attribute is coded as version="1.0", which indicates the document follows the XML version 1.0 syntax. The document should be coded to be "well-formed", even if it is not an entirely "valid" HTML document.
encoding

The encoding attribute indicates what character encoding has been used to encode the HTML document as a file or byte input stream. Most importantly, among other things, this determines how many bytes of raw data are consumed to compose each character of the decoded document.

One advantage of using encoding="UTF-8" or encoding="UTF-16" is that IRI references can be used without having to escape all of the non-ASCII characters in the query part.

standalone="yes" The standalone attribute with the value "yes" indicates that the document is a standalone document. When recognized as an HTML 5 document, the parser should not look for any external declarations since there is no DTD in HTML 5, in which case the standalone attribute is irrelevant. If a parser tries to process the document as an older version of HTML having a DTD or when processed by an XML parser, standalone="yes" indicates that it should ignore any external declarations, such as entity declarations or assumed attribute values.