Luk*_*uke 4 html validation html5
我收到以下行的HTML验证错误,如果我不在meta标签中执行此操作,我不知道应该在哪里指定我的字符集.
Line 5, Column 70: Attribute charset not allowed on element meta at this point.
<meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
Run Code Online (Sandbox Code Playgroud)
这是因为您将其放在Content-type元标记中,这是不允许的.
只需制作一个单独的元标记,例如
<meta charset="utf-8" />
Run Code Online (Sandbox Code Playgroud)
这应该验证你.
是的。您应该使用,因为这是 html5 中推荐的,这是一个新的推荐。
下面是一个简单的 html5 布局:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>
<body>
Content of the document......
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6411 次 |
| 最近记录: |