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

What do most developers use? Root-relative or absolute paths?

What do most developers use? Root-relative or absolute paths?

2 Answers

Steven Parker
Steven Parker
243,228 Points

I generally use relative (not root-relative) paths to make it simple to move the entire file structure into a sub-directory. I might use root-relative paths for images, libraries, or other resources that I feel confident will remain in a specific location on the system.

I normally would only use absolute paths when accessing resources on foreign systems.

Thank you.