简体   繁体   English

此时元素元上不允许使用属性名称

[英]Attribute name not allowed on element meta at this point

I am having the error multiple times here我在这里多次遇到错误

<meta name="description" content="Directus Media specialises in websites for small to medium businesses">​

http://validator.w3.org/check?uri=http%3A%2F%2Fcrimsoninformatics.info%2Fdirectus%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices http://validator.w3.org/check?uri=http%3A%2F%2Fcrimsoninformatics.info%2Fdirectus%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3+http%3A %2F%2Fvalidator.w3.org%2Fservices

Also the link attribute error:还有链接属性错误:

I wrote :-我写 :-

<link rel="stylesheet"  href="css/lib/essentials.css"/>

And it gives me error that link is missing required property.它给了我链接缺少必需属性的错误。

Please help as i am new to HTML5.请帮助,因为我是 HTML5 的新手。

Between two meta tags, the one with name="description" and the one with name="keywords" , the page contains the bytes 0xE2 0x80 0x8B (and some whitespace).在两个meta标记之间,一个带有name="description"和一个带有name="keywords" ,页面包含字节 0xE2 0x80 0x8B (和一些空白)。 The page is being interpreted as UTF-8 encoded, but that sequence of bytes is malformed UTF-8 (does not represent any character).该页面被解释为 UTF-8 编码,但该字节序列是格式错误的 UTF-8(不代表任何字符)。 Apparently, the validator still interprets it as a data character.显然,验证器仍然将其解释为数据字符。 This causes the head element to be prematurely closed, and the rest is… well, not history, but a consequence of this confusion.这会导致head元素过早关闭,剩下的就是……好吧,不是历史,而是这种混乱的结果。 The second of the meta tags is taken as being in the body part, and there special rules apply, making the tag invalid.第二个meta标记被视为在body部分,并且有特殊规则适用,使标记无效。

The real problem, anyway, is the presence of the bogus bytes 0xE2 0x80 0x8B.无论如何,真正的问题是存在虚假字节 0xE2 0x80 0x8B。 When they are removed, the page validates.当它们被删除时,页面会验证。

It is impossible to know, from outside, what produces those bytes.从外部不可能知道是什么产生了这些字节。 But they look suspiciously like a character encoding error, possibly causes by incorrectly performed UTF-8 encoding of some data that was already UTF-8 encoded, or something like that.但它们看起来很像字符编码错误,可能是由于对一些已经 UTF-8 编码的数据执行了不正确的 UTF-8 编码,或者类似的东西。

This was a tricky issue.这是一个棘手的问题。 I had to use Rex Swain's HTTP Viewer to check the raw data of the offending page .我不得不使用 Rex Swain 的HTTP 查看器来检查违规页面的原始数据。

Be sure to have UTF BOM removed from all source files.确保从所有源文件中删除 UTF BOM。 https://en.wikipedia.org/wiki/Byte_order_mark https://en.wikipedia.org/wiki/Byte_order_mark

With (at least) Firefox, when it saves a html page on disk, it corrects tags.使用(至少)Firefox,当它在磁盘上保存一个 html 页面时,它会更正标签。

So a way of correcting this kind of error is to load the offending page in Firefox, save it to disk and check how the browser corrected your meta tags in the saved version.因此,纠正这种错误的一种方法是在 Firefox 中加载有问题的页面,将其保存到磁盘并检查浏览器如何更正保存版本中的元标记。

Your complete link - Tag is:您的完整链接 - 标签是:

<link rel="stylesheet" type="text/css" href="css/lib/essentials.css"/>

and your Meta-Tags:和你的元标签:

<meta name="description" content="Directus Media specialises in websites for small to medium businesses" />​
<meta name="keywords" content="southport graphic design, liverpool web design, southport social media management" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />

Be careful: I think you used wrong "" on your meta-Tags (keywords and viewport)小心:我认为您在元标记(关键字和视口)上使用了错误的“”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 W3C验证错误:“目前,元素meta上不允许使用属性名称。” - W3C validation error: “Attribute name not allowed on element meta at this point.” “此时元素div上不允许使用属性名称” - “Attribute name not allowed on element div at this point” 此时不允许对元素输入进行属性捕获 - Attribute capture not allowed on element input at this point 此时元素符号上不允许使用属性宽度和高度 - Attribute width and height not allowed on element symbol at this point 此时元素“span”上不允许使用属性“datetime” - Attribute “datetime” not allowed on element “span” at this point 此时,元素按钮上不允许使用属性href - Attribute href not allowed on element button at this point 此时,元素li上不允许使用属性类别 - Attribute category not allowed on element li at this point 元标记的“元素元属性名称错误……”错误 - “Bad value … for attribute name on element meta” errors for meta tags 目前,元素视频上不允许使用属性类型。 如何解决这个错误? - Attribute type not allowed on element video at this point. how to fix this error? HTML 5验证失败,因为“此时元素a上不允许属性addthis:url”。 - HTML 5 Validation fails for “Attribute addthis:url not allowed on element a at this point.”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM