Should not be placed at the very top? Please explain to me what problems (if any) by placing th...">

Why <? Xml version = "1.0" encoding = "UTF-8"?> Should not be placed at the very top?

Please explain to me what problems (if any) by placing the following ad at the very top of the HTML page

<?xml version="1.0" encoding="UTF-8"?>
+3
source share
3 answers

This is not very good, because it will cause IE6 to go into quirky mode.

http://www.456bereastreet.com/archive/200904/using_an_xml_declaration_triggers_quirks_mode_in_ie_6/

And if you've ever worked with IE6 in quirks mode, you would know what a painful experience.

+5
source

, . , , , .

, UTF-8 UTF-16. . , .

IE6, IE6 "quirks", .

... IE6 - .

.

+1

, .

  • ( ) ,
  • , XHTML , " ", HTML. XML.

Also, if you use XML / XHTML, make sure that you also send the correct content type header (for example, application / xml instead of text / html).

0
source

Source: https://habr.com/ru/post/1778679/


All Articles