HTML meta tag for content language

后端 未结 5 1293
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 17:51

What is the difference between the following two HTML meta tags, for specifying spanish web page content:


         


        
5条回答
  •  Happy的楠姐
    2020-12-12 18:35

    This isn't defined in any specification (including the HTML5 draft)

    This is a poor man's version of a real HTTP header and should really be expressed in the headers. For example:

    Content-language: es
    Content-type: text/html;charset=UTF-8
    

    It says that the document is intended for Spanish language speakers (it doesn't, however mean the document is written in Spanish; it could, for example, be written in English as part of a language course for Spanish speakers).

    From the spec:

    The Content-Language entity-header field describes the natural language(s) of the intended audience for the enclosed entity. Note that this might not be equivalent to all the languages used within the entity-body.

    If you want to state that a document is written in Spanish then use:

    
    

提交回复
热议问题