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

eslam said
PLUS
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:

https://stackoverflow.com/questions/4476526/do-i-use-img-object-or-embed-for-svg-files

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.