For technical support for all editions of CSS HTML Validator. Includes bug reports.
- Rank II - Novice
- Posts: 28
- Joined: Sun Feb 04, 2018 10:19 am
The Validator indicates
Code: Select all
in the HTML below is an error, explaining:
Attributes of the form xmlns:prefix (like this "xmlns:svgjs" attribute) must not be used in HTML (but can be used in XHTML)
Code: Select all
<svg id="SvgjsSvg1006" width="300" height="300" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs">
<rect id="SvgjsRect1008" width="100" height="100" fill="#ff0066"></rect>
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 184.108.40.206 here: https://www.w3.org/TR/html5/syntax.html#attributes-0
- Site Admin
- Posts: 3363
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
I found this link:
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
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).