Converting svg code to .svg image file – HTML & CSS – SitePoint Forums

Thanks for all the previous help

I have been looking to convert the svg code to an image file, adding it to a text file and saving it as .svg.

The svg code shows the outline of a triangle, on the web page, but I don’t see anything when converted to .svg. If I “fill” a color, I see the triangle filled, but I would just like the image to show the outline of the triangle (like the code does).

What is the solution ?

You need to specify the stroke color, for example (with the usual self-closing tag):

To save as an .svg image file, it looks like you just need an XML prolog: