

No, SVG files are not HTML.
Please change this post title (currently “today i learned: svg files are literally just html code”), to avoid spreading this incorrect factoid!
I suggest you change it to “today i learned: svg files are just text in an html-like language” or something like that.
XML and HTML have many similarities, because they both are descendants of SGML. But, as others have noted in this thread, HTML is also not XML. (Except for when it’s XHTML…)
Like HTML, SVG also can use CSS, and, in some environments (eg, in browsers, but not in Inkscape) also JavaScript. But, the styles you can specify with CSS in SVG are quite different than those you can specify with CSS in HTML.
Lastly, you can embed SVG in HTML and it will work in (modern) browsers. You cannot embed HTML in SVG, however.
this has largely happened; if you’re on a dpkg-based distro try running this command:
dpkg -S svg | grep svg$ | sort
…and you’ll see that your distro includes thousands of SVG files :)
explanation of that pipeline:
dpkg -S svg
- this searches for files installed by the package manager which contain “svg” in their pathgrep svg$
- this filters the output to only show paths which end with svg; that is, the actual svg files. the argument to grep is a regular expression, where$
means “end of line”. you can invert the match (to see the pathsdpkg -S svg
found which only contain “svg” in the middle of the path) by writinggrep -v svg$
instead.sort
command does what it says on the tin, and makes the output easier to readyou can run
man dpkg
,man grep
, andman sort
to read more about each of these commands.