Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Embed interactive SVG file in HTML without pasting raw HTML code

I'm currently working on an interactive map, for which I used an SVG which I styled using CSS. All of this has been done within an <svg> tag, so I thought there would be a better way of including the map into my website's HTML without having to paste the raw code. I tried converting the code back to svg format and I've found several compilation errors; the HTML code works when opened with a browser. Any help is appreciated.

Thanks!

1 Answer

If you're familiar with JavaScript, D3.js handles this kind of stuff beautifully. Check out this free e-book for more information, specifically Chapter 12: Geomapping.