Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


eslam said
eslam said
Courses Plus Student 6,734 Points

svg icons

I made some icons for my navigation but the svg code looks really long and not organized, i know i can use font-awesome but they don't have the exact icons i want,

so should i just stick with font-awesome or there is away to organize svg code since its very long or should i just use normal images for navigation icons ?

1 Answer

Robert Schaap
Robert Schaap
19,836 Points

Sounds like you're trying to put the SVG code directly into your HTML page? You can also just link to your SVG with a normal IMG-tag like <img src="myicon.svg"> or embed it in a few other ways:


Depends what you're trying to do. If you're just using them as images, the IMG tag is fine. If you want to start looking into animating parts of your SVG, then the object tag as per the stack overflow thread is pretty useful.