Is SVG an alternative to Html?

a number of prototyping apps export the site in svg.

Is SVG an alternative to Html?
Can it be used in React or Vue?


SVG is a kind of image

Just for to be more specific, it’s is a way to describe images using an XML format called SVG that allows for interactivity.

Because it’s XML, yes you could use it instead of HTML, you could write an entire application just using SVG. Browsers understand XML and SVG just fine (though for arbitrary XML rather than SVG they need the schema/XSLT information to tell them how to convert it to something they can render). It’s going to behave strangely in some respects vs. HTML, but it can work.

Why you would want to do this is less clear: just because it’s possible doesn’t mean it’s a good idea. It’s an image format, it’s entirely geared towards providing functionality for [potentially interactive] vector images, not web pages. So a prototyping app exporting an interactive image makes sense. It can be opened in any browser, it can be dumped in a web page, etc. But it’s a prototype.

Sure, it’s SVG. Inline SVG is totally valid in an HTML document

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.