Bad value google for attribute name on element met

2019-05-11 09:35发布

Is there an alternative for HTML5 for google notranslate meta tag. I getting the error below when validating HTML5.

Bad value google for attribute name on element meta: Keyword google is not registered. <meta name="google" content="notranslate" />

2条回答
霸刀☆藐视天下
2楼-- · 2019-05-11 09:59

The keyword google is registered at http://wiki.whatwg.org/wiki/MetaExtensions#Registered_Extensions:

A content of notranslate will tell google not to pop up the translate bar / link if the page is in a foreign language form the user's browser.

<meta name="google" content="notranslate">

So it is valid to use this keyword in HTML5. If a validator reports this as an error, the validator is probably not up to date or simply wrong.

查看更多
SAY GOODBYE
3楼-- · 2019-05-11 10:02

The right way to do this for html5 is:

<html translate="no">
...
</html>

W3 says it should not be Google specific

查看更多
登录 后发表回答