1 / 8

Files and Directories

Files and Directories. How files are organized. HTML files and paths. How your code refers back to it’s content Relative vs. absolute Relative to the root or relative to the referring document < img src =“http://simpsons.com/images/homer.jpg” /> < img src =“images/homer.jpg” />

yaphet
Download Presentation

Files and Directories

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Files and Directories How files are organized

  2. HTML files and paths How your code refers back to it’s content Relative vs. absolute Relative to the root or relative to the referring document <imgsrc=“http://simpsons.com/images/homer.jpg” /> <imgsrc=“images/homer.jpg” /> <imgsrc=“/monkeys.jpg” /> <imgsrc=“/temp/homer.jpg” />

  3. The “root” of a website • Sometimes /web/ sometimes / • It is the beginning of the site and the directory holding the site. • A link to /folder2/file1.html is a link relative to the root of the folder.

  4. Same Directory • Just the name of the file: • <imgsrc=“homer.jpg” />

  5. Image in a folder in the same directory: • Just the name of the file: • <imgsrc=“images/homer.jpg” />

  6. Image in a folder ABOVE the current directory: • Just the name of the file: • <imgsrc=“../homer.jpg” />

  7. An absolute URL • shows the entire path to the file, including the scheme, server name, the complete path, and the file name itself • Like a street address • A relative to the document URL • points to the location of the desired file FROM THE FILE THAT CONTAINES THE URL. • Instead of an address, • Like saying “three doors down”, or “image xyz that is in the same directory as this file” • When working within pages you can reference pages & items within the same directories. Absolute & Relative URLs

More Related