Download presentation
Presentation is loading. Please wait.
1
Rules for Relative URLs
SITE DIRECTORY / (server root – e.g. /gum/ /gum/sugarless/ /gum/sugarless/about.html /candy/ /candy/chewy/ /candy/chewy/cherry/ /images/logo.png All directories have an index.html page Virtual starts with / Relative does not! FORWARDS Assuming we are in the gum directory Go to the index of the sugarless: sugarless/ (or sugarless or sugarless/index.html) Go to the about page in sugarless: sugarless/about.html BACKWARDS Assuming we are in the cherry directory Go back to the index of the chewy: ../ Go to the logo graphic in images: ../../../images/logo.png To go to a file in the current directory, say the file name. To go to a file in a directory in the current directory, say the directory then the file. To go backwards a directory use ../ Never say the current directory. Note the three ways to go to an index – any are fine, the dir/ is preferred.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.