What's the use of this line of code in an HTML page?
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
In a page refactoring process, see the static page of the first line there is a piece of code, followed by a large blank, in the deletion of the blank when the code accidentally deleted the line, and then ....
The original display normal page, an instant messy, font style has not, the key is placed in IE browser next look, layout is completely misplaced,,,, also thought is the style in addition to the problem, found a half-day also did not find the reason, fortunately, the original file has a backup, took out a comparison, on this line of code in doing strange, What the hell does it do?
<! The doctype> declaration is positioned at the front of the document, before the
doctype function
doctype statement indicates what rule sets the reader should use to interpret the markup in the document. In the case of a Web document, a "reader" is usually a program such as a browser or a validator, and "rules" are the rules contained in a document type definition (DTD) published by the website. &NBSP,
Each DTD includes a series of tags, attributes, and properties that mark the contents of a Web document, as well as rules that specify which tags can appear in other tags. Each Web recommendation standard (such as HTML 4 frameset and XHTML 1.0 Transitional) has its own DTD. &NBSP,
If the markup in the document does not follow the DTD specified by the DOCTYPE declaration, this document may not be displayed correctly in the browser, except in the case of code validation. The browser is more tolerant than the validator for problems with markup inconsistencies. However, incorrect DOCTYPE declarations often cause web pages to appear incorrectly or cause them to not display at all.
html<! The role of the doctype> statement