And the W3 validator also indicates that this is an error but I can't find the proper spec for it, save perhaps the concluding part of section 8.1.2.3 here: https://www.w3.org/TR/html5/syntax.html#attributes-0
Could the exact spec that elucidates this be provided in the Validator's error message? I'm corresponding with the authors of a JavaScript library that generates SVG elements with the errant namespace attribute, and I'd like to be able to cite a spec that makes the case clear.
And as you found and pointed out, the HTML spec says that there is only a specific list of namespaced attributes allowed in HTML, even in foreign content like SVG: https://html.spec.whatwg.org/multipage/ ... tributes-2
I will add that link to the CSS HTML Validator message.
I hope this helps. Please let me know if you have any more questions.
UPDATE: The message should now read (when extended messagesare enabled (the default)): Attributes of the form xmlns:prefix (like this "xmlns:svgjs" attribute) must not be used in HTML (but can be used in XHTML). Visit https://html.spec.whatwg.org/multipage/ ... tributes-2 for more information.
When extended messages are not enabled the message is shortened to: Attributes of the form xmlns:prefix (like this "xmlns:svgjs" attribute) must not be used in HTML (but can be used in XHTML).