<meta charset=“utf-8”> vs <meta http-equiv=“Content-Type”>

前端 未结 9 1066
后悔当初
后悔当初 2020-11-22 01:13

In order to define charset for HTML5 Doctype, which notation should I use?

  1. Short:

     
             
    
    
            
9条回答
  •  -上瘾入骨i
    2020-11-22 01:56

    was introduced with/for HTML5.

    As mentioned in the documentation, both are valid. However, is only for HTML5 (and easier to type/remember).

    In due time, the old style is bound to become deprecated in the near future. I'd stick to the new .

    There's only one way, but up. In tech's case, that's phasing out the old (really, REALLY fast)

    Documentation: HTML meta charset Attribute—W3Schools

提交回复
热议问题