0
votes

The Google+ JS API shows credentials and settings can be set using meta tags instead of passing through a JS call. Examples:

<meta name="google-signin-clientid" content="CLIENT_ID" />
<meta name="google-signin-cookiepolicy" content="single_host_origin" />

I tried this on my website and it works, but when I try to validate my HTML the validator gives errors such as:

Bad value google-signin-callback for attribute name on element meta: Keyword google-signin-callback is not registered.

Bad value google-signin-clientid for attribute name on element meta: Keyword google-signin-clientid is not registered.

Bad value google-signin-cookiepolicy for attribute name on element meta: Keyword google-signin-cookiepolicy is not registered.

Bad value google-signin-scope for attribute name on element meta: Keyword google-signin-scope is not registered.

Is the HTML code Google provides as an example really invalid?

2

2 Answers

2
votes

You are validating against HTML5 (this can be seen from the error messages), and as per HTML5 drafts, only a limited set of name attribute values are allowed in a meta element. So as an HTML5 document, the document is invalid, since the values used are among those allowed. HTML5 defines a registration procedure, but apparently Google cannot be bothered to use it.

If you validate against XHTML 1.0, the code will pass, because in XHTML 1.0, the name attribute value can be any name, like <meta name="Hi, I’m trying to make a point” content="" />. The same applies to HTML 4.01, except that the slash before “/” would cause a syntax error in it.

0
votes

It's valid HTML, the names being used are not part of the official standard. That's fine though since they are namespaced with google so you shouldn't have any issues.