Day 3: Definition Language Coding

xiaoxiao2021-03-06  77

The third step is to define your language coding, like this:

In order to be properly explained by the browser, all XHTML documents must declare the encoding language they use, we generally use GB2312 (Simplified Chinese), making multi-language page, can also use unicode, ISO-8859-1 Wait, define it according to your needs.

It is usually defined in this way. However, it is necessary to add that the XML document is not such a definition of language encoding, and the XML definition method is as follows:

You can see similar statements in Macromedia.com's homepage code, which is also a definition method for W3C recommendation. Then why don't we use this method directly? The reason is that some browsers are not perfect for standard support, and such definition methods cannot be correctly understood, such as IE6 / Windows. So under the current transition scenario, we still recommend using Meta mode. Of course, you can write two ways.

See the source code of this site, you will find that the language coding definition is more

This is written for the old version of the browser to ensure that all browsers can explain the page correctly.

Note: At the end of the statement, you see a slash "/", which is different from our previous HTML 4.0 code. The reason is that the XHTML grammar rules require that all identities must have started and end. For example, and ,

and , etc. For unpaired identifiers, require the last plus a space, then follow one "/". E.g.
written
, written , the reason is to avoid the code spaces together browsers do not recognize.

转载请注明原文地址:https://www.9cbs.com/read-92896.html

New Post(0)