What is the HTML5 alternative to the obsolete meta http-equiv=content-language.

前端 未结 2 559
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-17 07:30

I\'m finishing up an HTML5 site that has a mixture of English and Mandarin Chinese.

My validator (HTML5 Validator add-on for FF) is giving me this error:

<         


        
2条回答
  •  失恋的感觉
    2020-12-17 08:13

    In HTML5 you can actually define lang for each element. That means if you have a div that contains Mandarin Chinese in it, just define an attribute lang="zh-CN" for that div, like

    .

提交回复
热议问题