Bad value google for attribute name on element meta

五迷三道 提交于 2019-12-07 17:29: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" />


回答1:


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.




回答2:


The right way to do this for html5 is:

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

W3 says it should not be Google specific



来源:https://stackoverflow.com/questions/12849815/bad-value-google-for-attribute-name-on-element-meta

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!