Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>links to other documents, support for styling, shared resources, scripting, and so on

SVG supports all those things. SVG's use element can do exactly what the OP is talking about. You can put HTML in SVG and SVG in HTML. SVG is just markup exactly like HTML. SVG supports JavaScript and stylesheets. SVG can put text on a curve and other stylish things that boring boxy HTML cannot accomplish.

https://www.w3.org/2002/Talks/www2002-svgtut-ih/hwtut.pdf

Read it. Ch 11 shows you how use can import chunks of other SVG. Ch 12 is JavaScript. You can inline it in your html and style it with CSS just like any of the other tags in html. Once you know SVG, you can hand generate more compact images than anything created by something like Inkscape which just uses path elements for everything. For example, you can do a UPC barcode with a single SVG line element using a wide stroke and a stroke-dasharray. See chapter 8.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: