为了定义 HTML5 Doctype 的字符集,我应该使用哪种表示法?
短:
<meta charset="utf-8" />
长:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
最佳答案
在 HTML5 中,它们是等价的。使用较短的,因为它更容易记住和输入。 Browser support is fine因为它是为向后兼容而设计的。
关于html - <元字符集 ="utf-8"> vs <元 http-equiv ="Content-Type">,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4696499/