<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
Can xmlns="http://www.w3.org/2000/svg"
this be xmlns="https://www.w3.org/2000/svg"
?
or xmlns="//www.w3.org/2000/svg"
?
1 Answer. Show activity on this post. omitting the http or changing it to https will not work. The fact that the namespace contains http does not mean in any way that the SVG file will use the http protocol for any kind of communication.
Note: The xmlns attribute is only required on the outermost svg element of SVG documents. It is unnecessary for inner svg elements or inside HTML documents.
SVG namespace. http://www.w3.org/2000/svg is an XML namespace, first defined in the Scalable Vector Graphics (SVG) 1.0 Specification and subsequently added to by SVG 1.1, SVG 1.2 and SVG 2. The SVG namespace is mutable; names may be added over time by the W3C SVG Working Group by publication in W3C Technical Reports.
The xmlns attribute specifies the xml namespace for a document. Note: The xmlns attribute is required in XHTML, invalid in HTML 4.01, and optional in HTML5. Note: The HTML validator at http://w3.org does not complain when the xmlns attribute is missing in an XHTML document.
It's not really a URL, it's a namespace that simply happens to look like a URL. As such it must be written exactly as
xmlns="http://www.w3.org/2000/svg"
omitting the http or changing it to https will not work.
The fact that the namespace contains http does not mean in any way that the SVG file will use the http protocol for any kind of communication. The w3c could have defined the SVG namespace as foo in which case we'd all be writing xmlns="foo" and you'd not even be asking such questions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With