Why is it important to organize folders for a Web site? Describe a good folder structure for your project. Provide an example of a link using a relative file address and an example of a link using an absolute file address. Explain why you might choose a relative link over an absolute link.
Hi shiva, It's important to organize folders for a website because of the following reasons (among many more): 1. You probably won't be the one maintaining the website forever. The person following you up will need a clean & easily navigable folder structure so as to not spend hours figuring out how everything is connected. 2. For my folder structure, I tend to use the following folders (in a PHP project). - assets - css - images - scripts - includes - footer.php - header.php - sidebar.php The assets folder contains all my CSS, images, and JavaScript files. The includes folder contains portions of the site I can "include" into main pages. That way, I don't have to make a change in many places...only one. 3. The reason you'd choose relative over absolute is portability. If you decide to move your site from http://yoursite1.com to http://yoursite2.com, with relative links nothing needs to change. On the other hand, with absolute links...you may have hundreds or even thousands of places you need to make changes at. Scary, huh?
Join our real-time social learning platform and learn together with your friends!